Skip to content

oneMKL's CMake Does Not Detect SYCL Support when Compiled with intel/llvm #449

Open
@BenBrock

Description

@BenBrock

Summary

oneMKL uses CXX_COMPILER_NAME to detect SYCL support. This means that if a user compiles their own copy of intel/llvm, SYCL support is not detected and the MKL::MKL_SYCL library will not be available. (The CXX_COMPILER_NAME is by default Clang.)

Users can force set SYCL_COMPILER with -DSYCL_COMPILER=ON, which will make the MKL::MKL_SYCL library available. However, with CLANG_COMPILER also set, the intel_thread backend is also made available. This elicits a compiler warning:

bbrock@ortce-skl22:~/src/distributed-ranges/build/examples/shp$ make -j
Consolidate compiler generated dependencies of target fmt
Warning: Using MKL::MKL_SYCL* targets with intel_thread may have potential composability problems on CPU device with other SYCL kernels.
[  5%] Building CXX object _deps/cpp-format-build/CMakeFiles/fmt.dir/src/os.cc.o

Which seems to indicate this is still a sub-optimal solution.

Version

oneMKL develop branch.

Environment

  • Running on a system with two SPRs and 8 PVC GPUs.
  • Both production oneMKL 2024.0 and oneMKL develop.
  • Ubuntu 22.04 LTS
  • Fresh intel/llvm

CMake output

Steps to reproduce

Observed behavior

Build fails due to MKL::MKL_DPCPP/MKL::MKL_SYCL library not being available.

Expected behavior

I expect SYCL support to be detected by oneMKL and the build to succeed.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions