Skip to content

Commit

Permalink
Add header file to properly check MKL version at compile-time
Browse files Browse the repository at this point in the history
  • Loading branch information
s-Nick committed Oct 3, 2024
1 parent 562f1db commit 015fb53
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/dft/backends/mklgpu/backward.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include "mklgpu_helpers.hpp"

#include "mkl_version.h"
// MKLGPU header
#if INTEL_MKL_VERSION < 20250000
#include <oneapi/mkl/dfti.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/dft/backends/mklgpu/commit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "dft/backends/mklgpu/mklgpu_helpers.hpp"
#include "../stride_helper.hpp"

#include "mkl_version.h"
// MKLGPU header
#if INTEL_MKL_VERSION < 20250000
#include <oneapi/mkl/dfti.hpp>
Expand All @@ -43,7 +44,6 @@
#endif

// MKL 2024.1 deprecates input/output strides.
#include "mkl_version.h"
#if INTEL_MKL_VERSION < 20240001
#error MKLGPU requires oneMKL 2024.1 or later
#endif
Expand Down
1 change: 1 addition & 0 deletions src/dft/backends/mklgpu/forward.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#include "mklgpu_helpers.hpp"

#include "mkl_version.h"
// MKLGPU header
#if INTEL_MKL_VERSION < 20250000
#include <oneapi/mkl/dfti.hpp>
Expand Down
1 change: 1 addition & 0 deletions src/dft/backends/mklgpu/mklgpu_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "oneapi/mkl/detail/exceptions.hpp"
#include "oneapi/mkl/dft/detail/types_impl.hpp"

#include "mkl_version.h"
// MKLGPU header
#if INTEL_MKL_VERSION < 20250000
#include <oneapi/mkl/dfti.hpp>
Expand Down

0 comments on commit 015fb53

Please sign in to comment.