-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #47 - Detect RISC-V and RISC-V SIMD instructions set
- Loading branch information
Showing
11 changed files
with
165 additions
and
1,236 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 |
---|---|---|
|
@@ -39,7 +39,7 @@ jobs: | |
- name: Compiling Unit Tests | ||
run: cd build && make spy-test -j 2 | ||
- name: Running Unit Tests | ||
run: cd build && ctest --output-on-failure -j 2 | ||
run: cd build && ctest --verbose --output-on-failure -j 2 | ||
|
||
################################################################################################## | ||
## Windows Targets | ||
|
@@ -67,7 +67,7 @@ jobs: | |
- name: Running Tests | ||
run: | | ||
cd build | ||
ctest -C ${{ matrix.cfg.mode }} --output-on-failure | ||
ctest --verbose -C ${{ matrix.cfg.mode }} --output-on-failure | ||
clang-cl: | ||
runs-on: [windows-2022] | ||
|
@@ -92,7 +92,7 @@ jobs: | |
- name: Running Tests | ||
run: | | ||
cd build | ||
ctest -C ${{ matrix.cfg.mode }} --output-on-failure | ||
ctest --verbose -C ${{ matrix.cfg.mode }} --output-on-failure | ||
################################################################################################## | ||
## WASM targets | ||
|
@@ -118,7 +118,33 @@ jobs: | |
- name: Compiling Unit Tests | ||
run: cd build && ninja spy-test -j 2 | ||
- name: Running Unit Tests | ||
run: cd build && ctest --output-on-failure -j 2 | ||
run: cd build && ctest --verbose --output-on-failure -j 2 | ||
|
||
################################################################################################## | ||
## RISC-V targets | ||
################################################################################################## | ||
riscv: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/jfalcou/compilers:v8 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
cfg: | ||
- { comp: clang , arch: rvv128, mode: Debug } | ||
- { comp: clang , arch: rvv128, mode: Release } | ||
steps: | ||
- name: Fetch current branch | ||
uses: actions/[email protected] | ||
- name: Running CMake for ${{ matrix.cfg.comp }} in ${{ matrix.cfg.mode }} mode | ||
run: | | ||
mkdir build && cd build | ||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE="${{ matrix.cfg.mode }}" \ | ||
-DCMAKE_TOOLCHAIN_FILE=../test/toolchain/${{ matrix.cfg.comp }}.${{ matrix.cfg.arch }}.cmake | ||
- name: Compiling Unit Tests | ||
run: cd build && ninja spy-test -j 2 | ||
- name: Running Unit Tests | ||
run: cd build && ctest --verbose --output-on-failure -j 2 | ||
|
||
################################################################################################## | ||
## NVCC targets | ||
|
@@ -175,7 +201,7 @@ jobs: | |
- name: Compiling Unit Tests | ||
run: cd build && ninja spy-test -j 2 | ||
- name: Running Unit Tests | ||
run: cd build && ctest --output-on-failure -j 2 | ||
run: cd build && ctest --verbose --output-on-failure -j 2 | ||
|
||
################################################################################################## | ||
## Clang targets | ||
|
@@ -201,7 +227,7 @@ jobs: | |
- name: Compiling Unit Tests | ||
run: cd build && ninja spy-test -j 2 | ||
- name: Running Unit Tests | ||
run: cd build && ctest --output-on-failure -j 2 | ||
run: cd build && ctest --verbose --output-on-failure -j 2 | ||
|
||
################################################################################################## | ||
## gcc targets | ||
|
@@ -235,4 +261,4 @@ jobs: | |
- name: Compile Unit Tests | ||
run: cd build && ninja spy-test -j 2 | ||
- name: Running Unit Tests | ||
run: cd build && ctest --output-on-failure -j 2 | ||
run: cd build && ctest --verbose --output-on-failure -j 2 |
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
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
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,24 @@ | ||
//================================================================================================== | ||
/* | ||
SPY - C++ Informations Broker | ||
Copyright : SPY Project Contributors | ||
SPDX-License-Identifier: BSL-1.0 | ||
*/ | ||
//================================================================================================== | ||
#pragma once | ||
|
||
#if defined(__riscv_vector) | ||
// Flexible RISC-V Vector has no __riscv_v_fixed_vlen defined | ||
# if !defined(__riscv_v_fixed_vlen) | ||
# define SPY_SIMD_IS_RISCV_FLEXIBLE_RVV_CARDINAL | ||
// Fixed-size RISC-V Vector has __riscv_v_fixed_vlen | ||
#else | ||
# define SPY_SIMD_IS_RISCV_FIXED_RVV_CARDINAL | ||
#endif | ||
#endif | ||
|
||
#if !defined(SPY_SIMD_DETECTED) && defined(__riscv_vector) | ||
# define SPY_SIMD_IS_RISCV_RVV | ||
# define SPY_SIMD_VENDOR ::spy::detail::simd_isa::riscv_ | ||
# define SPY_SIMD_DETECTED ::spy::detail::simd_version::rvv_ | ||
#endif |
Oops, something went wrong.