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

[DFT][MKLGPU] Update mklgpu support to mkl preparing for oneapi 2025.0 release #575

Merged
merged 8 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/dft/backends/mklgpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ add_library(${LIB_OBJ} OBJECT
)
add_dependencies(onemkl_backend_libs_dft ${LIB_NAME})

target_include_directories(${LIB_OBJ}
PUBLIC ${ONEMKL_INTERFACE_INCLUDE_DIRS}
)
Copy link
Contributor Author

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.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @lhuot I updated the comment in 18bd3da

# using the flag "-iquote" to avoid conflicts and find the correct header.
target_compile_options(${LIB_OBJ}
BEFORE PRIVATE -iquote $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
Rbiessy marked this conversation as resolved.
Show resolved Hide resolved
)

target_include_directories(${LIB_OBJ}
PRIVATE ${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin
Expand Down
6 changes: 5 additions & 1 deletion src/dft/backends/mklgpu/backward.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
#include "mklgpu_helpers.hpp"

// MKLGPU header
#include "oneapi/mkl/dfti.hpp"
#if INTEL_MKL_VERSION < 20250000
#include <oneapi/mkl/dfti.hpp>
#else
#include <oneapi/mkl/dft.hpp>
#endif

namespace oneapi::mkl::dft::mklgpu {
namespace detail {
Expand Down
6 changes: 5 additions & 1 deletion src/dft/backends/mklgpu/commit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
#include "../stride_helper.hpp"

// MKLGPU header
#include "oneapi/mkl/dfti.hpp"
#if INTEL_MKL_VERSION < 20250000
#include <oneapi/mkl/dfti.hpp>
#else
#include <oneapi/mkl/dft.hpp>
#endif

// MKL 2024.1 deprecates input/output strides.
#include "mkl_version.h"
Expand Down
6 changes: 5 additions & 1 deletion src/dft/backends/mklgpu/forward.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@
#include "mklgpu_helpers.hpp"

// MKLGPU header
#include "oneapi/mkl/dfti.hpp"
#if INTEL_MKL_VERSION < 20250000
#include <oneapi/mkl/dfti.hpp>
#else
#include <oneapi/mkl/dft.hpp>
#endif

/**
Note that in this file, the Intel oneMKL-GPU library's interface mirrors the
Expand Down
6 changes: 5 additions & 1 deletion src/dft/backends/mklgpu/mklgpu_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
#include "oneapi/mkl/dft/detail/types_impl.hpp"

// MKLGPU header
#include "oneapi/mkl/dfti.hpp"
#if INTEL_MKL_VERSION < 20250000
#include <oneapi/mkl/dfti.hpp>
#else
#include <oneapi/mkl/dft.hpp>
#endif

namespace oneapi {
namespace mkl {
Expand Down