diff --git a/cmake/platform.cmake b/cmake/platform.cmake index 87ae6e9745a..bc703faa0e4 100644 --- a/cmake/platform.cmake +++ b/cmake/platform.cmake @@ -437,7 +437,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 - 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)