From 60a20be8d2567e2e9779310ab332f9e36019505a Mon Sep 17 00:00:00 2001 From: Alexandra Sidorova Date: Thu, 24 Oct 2024 15:23:20 +0400 Subject: [PATCH] cmake: added rvv intrinsics compilation check --- cmake/platform.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/platform.cmake b/cmake/platform.cmake index 3c0b42123d6..90f7f45fe25 100644 --- a/cmake/platform.cmake +++ b/cmake/platform.cmake @@ -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 - 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)