Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BenBrock opened this issue Feb 22, 2024 · 1 comment · May be fixed by #450
Open

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

BenBrock opened this issue Feb 22, 2024 · 1 comment · May be fixed by #450
Assignees

Comments

@BenBrock
Copy link

BenBrock commented Feb 22, 2024

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.

@BenBrock BenBrock linked a pull request Feb 22, 2024 that will close this issue
9 tasks
@BenBrock
Copy link
Author

I implemented a first stab at this in a new PR #450. It is based on oneDPL's CMake and modifies MKL's MKLConfig.cmake to explicitly check for support for the -fsycl flag and SYCL headers.

@BenBrock BenBrock changed the title oneMKL's CMake Does Not Detect SYCL Support when Compiled with intel/llvm oneMKL's CMake Does Not Detect SYCL Support when Compiled with intel/llvm Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants