Giter Site home page Giter Site logo

ksco / neon2rvv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from howjmay/neon2rvv

0.0 0.0 0.0 2.3 MB

A translator from ARM NEON intrinsics to RISCV-V Extension implementation

License: MIT License

Shell 0.04% C++ 61.23% Python 0.26% C 38.39% Makefile 0.08%

neon2rvv's Introduction

neon2rvv

A C/C++ header file that converts Arm/Aarch64 NEON intrinsics to RISC-V Vector (RVV) Extension.

Introduction

neon2rvv is a translator of Arm/Aarch64 NEON intrinsics to RISC-V Vector (RVV) Extension, shortening the time needed to get an RISCV working program that then can be used to extract profiles and to identify hot paths in the code. The header file neon2rvv.h contains several of the functions provided by NEON intrinsic header, <arm_neon.h>, only implemented with RISCV-based counterparts to produce the exact semantics of the intrinsics.

Usage

  • Put the file neon2rvv.h in to your source code directory.

  • Replace the header file arm_neon.h with neon2rvv.h.

    #include "neon2rvv.h"
  • Explicitly specify platform-specific options to gcc/clang compilers

    -march=rv64gcv_zba

Targets and Limitations

The preliminary stage development goal of neon2rvv is targeting RV64 architecture with 128 bits vector register size (vlen == 128), which means the implementation is compiled with -march=rv64gcv_zba flag.

We are using RISC-V GNU Compiler Toolchain for development.

Development

Run Tests

neon2rvv provides a unified interface for developing test cases. These test cases are located in tests directory, and the input data is specified at runtime. Use the following commands to perform test cases:

You can run the tests under the architecture of your current machine. This can help you verify the implementation of tests case if you run the tests on ARM machines. Now the tests support Aarch64 only.

$ make test

You can specify GNU toolchain for cross compilation as well. For simulator, RISC-V ISA Simulator, Spike is used in default.

$ make CROSS_COMPILE=riscv64-unknown-elf- check # rv64

For developers who wants to run the cross-compiled tests with qemu-riscv64, you can specify QEMU with following command.

$ make CROSS_COMPILE=riscv64-unknown-elf- SIMULATOR_TYPE=qemu test

Official Documents

References

neon2rvv's People

Contributors

howjmay avatar omaghiarimg avatar ksco avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.