-
Notifications
You must be signed in to change notification settings - Fork 160
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
[DFT][MKLGPU] Update mklgpu support to mkl preparing for oneapi 2025.0 release #575
[DFT][MKLGPU] Update mklgpu support to mkl preparing for oneapi 2025.0 release #575
Conversation
Update how dft mklgpu backend include header files from MKL and how cmake add them to compilation. This is done to avoid name conflicts between interface and library backends. Force compiler to look for some header following the "" and <> inclusions rules accordingly with C++ Core Guideline SF.12
@@ -32,12 +32,14 @@ add_library(${LIB_OBJ} OBJECT | |||
) | |||
add_dependencies(onemkl_backend_libs_dft ${LIB_NAME}) | |||
|
|||
target_include_directories(${LIB_OBJ} | |||
PUBLIC ${ONEMKL_INTERFACE_INCLUDE_DIRS} | |||
) |
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.
Giving the includes change I made a little bit down. This command is not necessary anymore, so I decided to remove it trying to keep the cmake as lean as possible.
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.
LGTM, thanks for this.
I'll approve once we have been able to test this with nightly builds.
The new MKL release changed the message of unimplemented exception. Since tests were skipped by checking that message, some tests started to fail. Update skipping check to keep compatibility with both versions.
Removing enum elements that cause compilation failure in MKL 2025.0 Apparently also previous version don't need them.
Log using next MKL |
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.
LGTM, minor comment added. Thank you!
target_include_directories(${LIB_NAME} | ||
PUBLIC ${ONEMKL_INTERFACE_INCLUDE_DIRS} | ||
) | ||
|
||
# Due to using the same file name for different headers in this library and in | ||
# MKL Intel library, we force the compiler to follow C++ Core Guideline SF.12 |
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.
# MKL Intel library, we force the compiler to follow C++ Core Guideline SF.12 | |
# the Intel(R) oneAPI Math Kernel Library, we force the compiler to follow C++ Core Guideline SF.12 |
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.
@@ -75,7 +75,8 @@ class ComputeTests_real_real_out_of_place_REAL | |||
} \ | |||
catch (std::exception & e) { \ | |||
std::string msg = e.what(); \ | |||
if (msg.find("FFT_UNIMPLEMENTED") != std::string::npos) { \ | |||
if ((msg.find("FFT_UNIMPLEMENTED") != std::string::npos) || \ | |||
(msg.find("Unimplemented") != std::string::npos)) { \ |
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.
@s-Nick, was this addition motivated by a new exception that's not a oneapi::mkl::unimplemented
exception with "Unimplemented" in its message? If yes, could you please share details?
Intel oneMKL deprecated the old descriptors in 2024.1 and is very vocal at runtime about it. Open-source oneMKL added the new descriptors in v0.5. As they don't have versioning macros just yet and we don't prioritize backward-compatibility there, we bump the minimal required version of oneMKL. Also update the include path for the upcoming oneMKL 2025.0 (ref: oneapi-src/oneMKL#575) and remove an outdated comment. Refs #4744
Description
Update how dft mklgpu backend includes header files from MKL and how cmake adds them to compilation.
This is done to avoid future name conflicts between this library and backend library. Forcing the compiler to look for some headers following the "" and <> inclusions rules accordingly with C++ Core Guideline SF.12
Checklist
All Submissions
Do all unit tests pass locally? Attach a log.
arc_mklgpu_dft_log.txt
N.B. Tests ran with current oneAPI release (2024.2) I cannot run tests with next one.
Have you formatted the code using clang-format?