Skip to content

Commit

Permalink
[SYCL][libdevice] Build for spirv64 on Linux (#13302)
Browse files Browse the repository at this point in the history
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 <nick.sarnie@intel.com>
  • Loading branch information
sarnex committed Apr 5, 2024
1 parent fd2aca0 commit 8bc909e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libdevice/cmake/modules/SYCLLibdevice.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8bc909e

Please sign in to comment.