-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Support for the RISC-V Vector Extension in ARM NEON (#1130)
* feat : add ci test for RISC-V Vector * feat : modify types.h for risc-v vector extension * feat : modify simde utilities for rvv * feat : modify load & store for risc-v v extension * feat : modify load & store for risc-v vector * feat : add and mul neon to rvv * feat : add rvv CI without zvfh * feat : add rvv implementation (mul_lane) * feat : add mulx_lane neon2rvv
- Loading branch information
1 parent
7065926
commit b4e805a
Showing
38 changed files
with
4,465 additions
and
1,474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -396,6 +396,82 @@ jobs: | |
- name: Test | ||
run: meson test -C build --print-errorlogs --print-errorlogs $(meson test -C build --list | grep -v emul) | ||
|
||
clang-qemu-rvv: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- version: 17 | ||
cross: riscv64+rvv_vlen128_elen64 | ||
arch_gnu: riscv64 | ||
arch_deb: riscv64 | ||
distro: ubuntu-22.04 | ||
- version: 17 | ||
cross: riscv64+rvv_vlen256_elen64 | ||
arch_gnu: riscv64 | ||
arch_deb: riscv64 | ||
distro: ubuntu-22.04 | ||
- version: 17 | ||
cross: riscv64+rvv_vlen512_elen64 | ||
arch_gnu: riscv64 | ||
arch_deb: riscv64 | ||
distro: ubuntu-22.04 | ||
- version: 17 | ||
cross: riscv64+rvv_vlen128_elen64_zvfh | ||
arch_gnu: riscv64 | ||
arch_deb: riscv64 | ||
distro: ubuntu-22.04 | ||
- version: 17 | ||
cross: riscv64+rvv_vlen256_elen64_zvfh | ||
arch_gnu: riscv64 | ||
arch_deb: riscv64 | ||
distro: ubuntu-22.04 | ||
- version: 17 | ||
cross: riscv64+rvv_vlen512_elen64_zvfh | ||
arch_gnu: riscv64 | ||
arch_deb: riscv64 | ||
distro: ubuntu-22.04 | ||
runs-on: ${{ matrix.distro }} | ||
container: | ||
image: amd64/ubuntu:23.10 | ||
steps: | ||
- run: apt-get update | ||
- name: Install git | ||
run: | | ||
apt-get install -y git | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: CPU Information | ||
run: cat /proc/cpuinfo | ||
- name: Install APT Dependencies | ||
run: | | ||
apt-get install -y python3 python3-pip git ninja-build pkg-config libglib2.0-dev \ | ||
lsb-release wget software-properties-common gnupg qemu-user pipx | ||
apt-get install -y clang-${{ matrix.version }} lldb-${{ matrix.version }} lld-${{ matrix.version }} | ||
#add-apt-repository ppa:savoury1/virtualisation | ||
#add-apt-repository ppa:savoury1/display | ||
apt-get update -y | ||
apt-get -yq install ninja-build parallel \ | ||
binfmt-support libc6-${{ matrix.arch_deb }}-cross \ | ||
libstdc++-12-dev-${{ matrix.arch_deb }}-cross binutils-${{ matrix.arch_gnu }}-linux-gnu | ||
apt install meson | ||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ github.job }}-${{ matrix.distro }}-${{ matrix.cross }} | ||
- name: add ccache to the build path | ||
run: | | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
- name: Configure | ||
run: | | ||
meson setup --cross-file=docker/cross-files/${{ matrix.cross }}-clang-${{ matrix.version }}-ccache.cross build \ | ||
|| (cat build/meson-logs/meson-log.txt ; false) | ||
- name: Build | ||
run: ninja -C build -v | ||
- name: Test | ||
run: meson test -C build --print-errorlogs --print-errorlogs $(meson test -C build --list | grep -v emul) | ||
|
||
clang-qemu: | ||
strategy: | ||
fail-fast: false | ||
|
37 changes: 37 additions & 0 deletions
37
docker/cross-files/riscv64+rvv_vlen128_elen64-clang-17-ccache.cross
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[binaries] | ||
c = 'clang-17' | ||
cpp = 'clang++-17' | ||
ar = 'llvm-ar-17' | ||
strip = 'llvm-strip-17' | ||
objcopy = 'llvm-objcopy-17' | ||
ld = 'llvm-ld-17' | ||
exe_wrapper = ['qemu-riscv64', '-L', '/usr/riscv64-linux-gnu/', '-cpu', 'rv64,v=true,vlen=128,elen=64,vext_spec=v1.0'] | ||
|
||
[properties] | ||
c_args = ['--target=riscv64-linux-gnu', | ||
'-isystem=/usr/riscv64-linux-gnu/include', | ||
'-march=rv64gcv1', | ||
'-menable-experimental-extensions', | ||
'-mrvv-vector-bits=128', | ||
'-Wextra', | ||
'-Werror', | ||
'-Wno-unsafe-buffer-usage'] | ||
|
||
cpp_args = ['--target=riscv64-linux-gnu', | ||
'-isystem=/usr/riscv64-linux-gnu/include', | ||
'-march=rv64gcv1', | ||
'-menable-experimental-extensions', | ||
'-mrvv-vector-bits=128', | ||
'-Wextra', | ||
'-Werror', | ||
'-Wno-unsafe-buffer-usage'] | ||
|
||
c_link_args = ['--target=riscv64-linux-gnu'] | ||
|
||
cpp_link_args = ['--target=riscv64-linux-gnu'] | ||
|
||
[host_machine] | ||
system = 'linux' | ||
cpu_family = 'riscv64' | ||
cpu = 'rv64,v=true,vlen=128,elen=64,vext_spec=v1.0' | ||
endian = 'little' |
37 changes: 37 additions & 0 deletions
37
docker/cross-files/riscv64+rvv_vlen128_elen64_zvfh-clang-17-ccache.cross
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[binaries] | ||
c = 'clang-17' | ||
cpp = 'clang++-17' | ||
ar = 'llvm-ar-17' | ||
strip = 'llvm-strip-17' | ||
objcopy = 'llvm-objcopy-17' | ||
ld = 'llvm-ld-17' | ||
exe_wrapper = ['qemu-riscv64', '-L', '/usr/riscv64-linux-gnu/', '-cpu', 'rv64,v=true,Zfh=true,x-zvfh=true,vlen=128,elen=64,vext_spec=v1.0'] | ||
|
||
[properties] | ||
c_args = ['--target=riscv64-linux-gnu', | ||
'-isystem=/usr/riscv64-linux-gnu/include', | ||
'-march=rv64gcv1_zfh_zvfh', | ||
'-menable-experimental-extensions', | ||
'-mrvv-vector-bits=128', | ||
'-Wextra', | ||
'-Werror', | ||
'-Wno-unsafe-buffer-usage'] | ||
|
||
cpp_args = ['--target=riscv64-linux-gnu', | ||
'-isystem=/usr/riscv64-linux-gnu/include', | ||
'-march=rv64gcv1_zfh_zvfh', | ||
'-menable-experimental-extensions', | ||
'-mrvv-vector-bits=128', | ||
'-Wextra', | ||
'-Werror', | ||
'-Wno-unsafe-buffer-usage'] | ||
|
||
c_link_args = ['--target=riscv64-linux-gnu'] | ||
|
||
cpp_link_args = ['--target=riscv64-linux-gnu'] | ||
|
||
[host_machine] | ||
system = 'linux' | ||
cpu_family = 'riscv64' | ||
cpu = 'rv64,v=true,Zfh=true,x-zvfh=true,vlen=128,elen=64,vext_spec=v1.0' | ||
endian = 'little' |
37 changes: 37 additions & 0 deletions
37
docker/cross-files/riscv64+rvv_vlen256_elen64-clang-17-ccache.cross
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[binaries] | ||
c = 'clang-17' | ||
cpp = 'clang++-17' | ||
ar = 'llvm-ar-17' | ||
strip = 'llvm-strip-17' | ||
objcopy = 'llvm-objcopy-17' | ||
ld = 'llvm-ld-17' | ||
exe_wrapper = ['qemu-riscv64', '-L', '/usr/riscv64-linux-gnu/', '-cpu', 'rv64,v=true,vlen=256,elen=64,vext_spec=v1.0'] | ||
|
||
[properties] | ||
c_args = ['--target=riscv64-linux-gnu', | ||
'-isystem=/usr/riscv64-linux-gnu/include', | ||
'-march=rv64gcv1', | ||
'-menable-experimental-extensions', | ||
'-mrvv-vector-bits=256', | ||
'-Wextra', | ||
'-Werror', | ||
'-Wno-unsafe-buffer-usage'] | ||
|
||
cpp_args = ['--target=riscv64-linux-gnu', | ||
'-isystem=/usr/riscv64-linux-gnu/include', | ||
'-march=rv64gcv1', | ||
'-menable-experimental-extensions', | ||
'-mrvv-vector-bits=256', | ||
'-Wextra', | ||
'-Werror', | ||
'-Wno-unsafe-buffer-usage'] | ||
|
||
c_link_args = ['--target=riscv64-linux-gnu'] | ||
|
||
cpp_link_args = ['--target=riscv64-linux-gnu'] | ||
|
||
[host_machine] | ||
system = 'linux' | ||
cpu_family = 'riscv64' | ||
cpu = 'rv64,v=true,vlen=256,elen=64,vext_spec=v1.0' | ||
endian = 'little' |
37 changes: 37 additions & 0 deletions
37
docker/cross-files/riscv64+rvv_vlen256_elen64_zvfh-clang-17-ccache.cross
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[binaries] | ||
c = 'clang-17' | ||
cpp = 'clang++-17' | ||
ar = 'llvm-ar-17' | ||
strip = 'llvm-strip-17' | ||
objcopy = 'llvm-objcopy-17' | ||
ld = 'llvm-ld-17' | ||
exe_wrapper = ['qemu-riscv64', '-L', '/usr/riscv64-linux-gnu/', '-cpu', 'rv64,v=true,Zfh=true,x-zvfh=true,vlen=256,elen=64,vext_spec=v1.0'] | ||
|
||
[properties] | ||
c_args = ['--target=riscv64-linux-gnu', | ||
'-isystem=/usr/riscv64-linux-gnu/include', | ||
'-march=rv64gcv1_zfh_zvfh', | ||
'-menable-experimental-extensions', | ||
'-mrvv-vector-bits=256', | ||
'-Wextra', | ||
'-Werror', | ||
'-Wno-unsafe-buffer-usage'] | ||
|
||
cpp_args = ['--target=riscv64-linux-gnu', | ||
'-isystem=/usr/riscv64-linux-gnu/include', | ||
'-march=rv64gcv1_zfh_zvfh', | ||
'-menable-experimental-extensions', | ||
'-mrvv-vector-bits=256', | ||
'-Wextra', | ||
'-Werror', | ||
'-Wno-unsafe-buffer-usage'] | ||
|
||
c_link_args = ['--target=riscv64-linux-gnu'] | ||
|
||
cpp_link_args = ['--target=riscv64-linux-gnu'] | ||
|
||
[host_machine] | ||
system = 'linux' | ||
cpu_family = 'riscv64' | ||
cpu = 'rv64,v=true,Zfh=true,x-zvfh=true,vlen=256,elen=64,vext_spec=v1.0' | ||
endian = 'little' |
37 changes: 37 additions & 0 deletions
37
docker/cross-files/riscv64+rvv_vlen512_elen64-clang-17-ccache.cross
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[binaries] | ||
c = 'clang-17' | ||
cpp = 'clang++-17' | ||
ar = 'llvm-ar-17' | ||
strip = 'llvm-strip-17' | ||
objcopy = 'llvm-objcopy-17' | ||
ld = 'llvm-ld-17' | ||
exe_wrapper = ['qemu-riscv64', '-L', '/usr/riscv64-linux-gnu/', '-cpu', 'rv64,v=true,vlen=512,elen=64,vext_spec=v1.0'] | ||
|
||
[properties] | ||
c_args = ['--target=riscv64-linux-gnu', | ||
'-isystem=/usr/riscv64-linux-gnu/include', | ||
'-march=rv64gcv1', | ||
'-menable-experimental-extensions', | ||
'-mrvv-vector-bits=512', | ||
'-Wextra', | ||
'-Werror', | ||
'-Wno-unsafe-buffer-usage'] | ||
|
||
cpp_args = ['--target=riscv64-linux-gnu', | ||
'-isystem=/usr/riscv64-linux-gnu/include', | ||
'-march=rv64gcv1', | ||
'-menable-experimental-extensions', | ||
'-mrvv-vector-bits=512', | ||
'-Wextra', | ||
'-Werror', | ||
'-Wno-unsafe-buffer-usage'] | ||
|
||
c_link_args = ['--target=riscv64-linux-gnu'] | ||
|
||
cpp_link_args = ['--target=riscv64-linux-gnu'] | ||
|
||
[host_machine] | ||
system = 'linux' | ||
cpu_family = 'riscv64' | ||
cpu = 'rv64,v=true,vlen=512,elen=64,vext_spec=v1.0' | ||
endian = 'little' |
37 changes: 37 additions & 0 deletions
37
docker/cross-files/riscv64+rvv_vlen512_elen64_zvfh-clang-17-ccache.cross
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[binaries] | ||
c = 'clang-17' | ||
cpp = 'clang++-17' | ||
ar = 'llvm-ar-17' | ||
strip = 'llvm-strip-17' | ||
objcopy = 'llvm-objcopy-17' | ||
ld = 'llvm-ld-17' | ||
exe_wrapper = ['qemu-riscv64', '-L', '/usr/riscv64-linux-gnu/', '-cpu', 'rv64,v=true,Zfh=true,x-zvfh=true,vlen=512,elen=64,vext_spec=v1.0'] | ||
|
||
[properties] | ||
c_args = ['--target=riscv64-linux-gnu', | ||
'-isystem=/usr/riscv64-linux-gnu/include', | ||
'-march=rv64gcv1_zfh_zvfh', | ||
'-menable-experimental-extensions', | ||
'-mrvv-vector-bits=512', | ||
'-Wextra', | ||
'-Werror', | ||
'-Wno-unsafe-buffer-usage'] | ||
|
||
cpp_args = ['--target=riscv64-linux-gnu', | ||
'-isystem=/usr/riscv64-linux-gnu/include', | ||
'-march=rv64gcv1_zfh_zvfh', | ||
'-menable-experimental-extensions', | ||
'-mrvv-vector-bits=512', | ||
'-Wextra', | ||
'-Werror', | ||
'-Wno-unsafe-buffer-usage'] | ||
|
||
c_link_args = ['--target=riscv64-linux-gnu'] | ||
|
||
cpp_link_args = ['--target=riscv64-linux-gnu'] | ||
|
||
[host_machine] | ||
system = 'linux' | ||
cpu_family = 'riscv64' | ||
cpu = 'rv64,v=true,Zfh=true,x-zvfh=true,vlen=512,elen=64,vext_spec=v1.0' | ||
endian = 'little' |
Oops, something went wrong.