From 8bc909e01ece4e177ae25168995be21f0d37abc6 Mon Sep 17 00:00:00 2001 From: Nick Sarnie Date: Sat, 6 Apr 2024 04:40:58 +0900 Subject: [PATCH] [SYCL][libdevice] Build for spirv64 on Linux (#13302) Otherwise we will hit problems with compiling with `-fsycl-targets=spirv64`. Eventually we will need to expand this for the non-JIT `spirv64` targets, but those aren't supported today. We only build on Linux today because of ptrdiff_t size differences causing compiler errors on Windows. Found this also while working on thinLTO. --------- Signed-off-by: Sarnie, Nick --- libdevice/cmake/modules/SYCLLibdevice.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libdevice/cmake/modules/SYCLLibdevice.cmake b/libdevice/cmake/modules/SYCLLibdevice.cmake index 1d2e1b4de64f5..94ce6b19053bb 100644 --- a/libdevice/cmake/modules/SYCLLibdevice.cmake +++ b/libdevice/cmake/modules/SYCLLibdevice.cmake @@ -22,6 +22,15 @@ string(CONCAT sycl_targets_opt "spir64_fpga-unknown-unknown," "spir64-unknown-unknown") +if (NOT WIN32) + # Don't build for spirv64 on Windows due to + # some type size difference issues. + # Build on once Windows once internal tracker is fixed. + string(APPEND + sycl_targets_opt + ",spirv64-unknown-unknown") +endif() + set(compile_opts # suppress an error about SYCL_EXTERNAL being used for # a function with a raw pointer parameter.