-
Notifications
You must be signed in to change notification settings - Fork 563
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
Tribits: find SYCL libraries for TPL MKL #13520
Conversation
Signed-off-by: Brian Kelley <[email protected]>
df93792
to
0aee2ae
Compare
Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection is Not Necessary for this Pull Request. |
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: PR_gcc-openmpi-openmp
Jenkins Parameters
Build InformationTest Name: PR_gcc
Jenkins Parameters
Build InformationTest Name: PR_gcc-openmpi_debug
Jenkins Parameters
Build InformationTest Name: PR_clang
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_python3
Jenkins Parameters
Build InformationTest Name: PR_cuda
Jenkins Parameters
Build InformationTest Name: PR_intel
Jenkins Parameters
Build InformationTest Name: PR_cuda-uvm
Jenkins Parameters
Using Repos:
Pull Request Author: brian-kelley |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED Pull Request Auto Testing has PASSED (click to expand)Build InformationTest Name: PR_gcc-openmpi-openmp
Jenkins Parameters
Build InformationTest Name: PR_gcc
Jenkins Parameters
Build InformationTest Name: PR_gcc-openmpi_debug
Jenkins Parameters
Build InformationTest Name: PR_clang
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_python3
Jenkins Parameters
Build InformationTest Name: PR_cuda
Jenkins Parameters
Build InformationTest Name: PR_intel
Jenkins Parameters
Build InformationTest Name: PR_cuda-uvm
Jenkins Parameters
|
Status Flag 'Pre-Merge Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks reasonable, we should make a not to add these options to the spack package though.
Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ lucbv ]! |
Status Flag 'Pull Request AutoTester' - AutoMerge IS ENABLED, but the Label AT: AUTOMERGE is not set. Either set Label AT: AUTOMERGE or manually merge the PR... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By avoiding changing FindTPLBLAS.cmake
and FindTPLLAPACK.cmake
, and having these changes only kick in when Kokkos_ENABLE_SYCL
is set to true, this is a very safe and straightforward PR. Looks good to merge to me.
(NOTE: This kicks the can down the road w.r.t. to getting BLAS and LAPACK automatically when MKL is enabled and found , but we can't let "best" be the enemy of "better", and incremental is better than all-at-once.)
Status Flag 'Pull Request AutoTester' - AutoMerge IS ENABLED, but the Label AT: AUTOMERGE is not set. Either set Label AT: AUTOMERGE or manually merge the PR... |
@lucbv I agree, there isn't a |
@trilinos/tribits
@trilinos/kokkos-kernels
Motivation
This PR allows OneAPI/MKL with SYCL support to be enabled in Trilinos, where it wasn't before. With MKL+SYCL enabled, KokkosKernels can call MKL kernels on both host and device.
We now have a nightly performance build on Sunspot, but it can't enable MKL because of this problem.
The only caveat is SYCL+MKL requires OneAPI 2024.1 or above, since before that, the SYCL libraries were not available for the intel_lp64 interface that Trilinos needs. intel_lp64 means that BLAS/LAPACK functions use int (32-bit) argument types for dimensions and strides. This is required for when the Teuchos BLAS and LAPACK wrappers call functions from MKL libs.
Related Issues
Partly supersedes #13330. This is only about enabling MKL for SYCL GPUs. This doesn't attempt to explicitly define the BLAS and LAPACK TPLs in terms of MKL. Nothing changes for users of MKL on CPU; they are still responsible for pointing CMake to the BLAS/LAPACK libraries they want (whether that is also MKL or something else).
That is still worthwhile but as @bartlettroscoe said in the #13330 discussion, it:
a) requires extra care to have Tribits install the correct BLASConfig and LAPACKConfig cmake files, and
b) may break numerical backwards compatibility for users that loaded both MKL and non-MKL BLAS/LAPACK.
Stakeholder Feedback
Testing
Tested on Sunspot with MKL on GPU and CPU, and on Blake with MKL on CPU only. KokkosKernels and Tpetra tests passed. On Sunspot I used the kernel logger to verify that the OneAPI was being used by KokkosKernels.