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.
Summary
oneMKL uses
CXX_COMPILER_NAMEto detect SYCL support. This means that if a user compiles their own copy ofintel/llvm, SYCL support is not detected and theMKL::MKL_SYCLlibrary will not be available. (TheCXX_COMPILER_NAMEis by defaultClang.)Users can force set
SYCL_COMPILERwith-DSYCL_COMPILER=ON, which will make theMKL::MKL_SYCLlibrary available. However, withCLANG_COMPILERalso set, theintel_threadbackend is also made available. This elicits a compiler warning:Which seems to indicate this is still a sub-optimal solution.
Version
oneMKL
developbranch.Environment
2024.0and oneMKL develop.intel/llvmCMake output
Steps to reproduce
intel/llvmObserved behavior
Build fails due to
MKL::MKL_DPCPP/MKL::MKL_SYCLlibrary not being available.Expected behavior
I expect SYCL support to be detected by oneMKL and the build to succeed.