Skip to content

Commit

Permalink
cmake: added rvv intrinsics compilation check
Browse files Browse the repository at this point in the history
  • Loading branch information
a-sidorova authored and dmitry-gorokhov committed Oct 31, 2024
1 parent 1fe8ee5 commit 60a20be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/platform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,10 @@ if (DNNL_TARGET_ARCH STREQUAL "RV64")
# Check if the RVV Intrinsics can be compiled with the current toolchain and flags
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("#include <riscv_vector.h>
int main() { return 0; };"
int main() {
size_t size = 64;
return vsetvl_e32m2(size);
};"
CAN_COMPILE_RVV_INTRINSICS
)
# set CAN_COMPILE_RVV_INTRINSICS to TRUE / FALSE instead of 1 / "" (Undefined)
Expand Down

0 comments on commit 60a20be

Please sign in to comment.