Skip to content

Commit 6eb81b9

Browse files
authored
Merge 3dab364 into cc2889b
2 parents cc2889b + 3dab364 commit 6eb81b9

File tree

9 files changed

+367
-37
lines changed

9 files changed

+367
-37
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ In addition, this release completes implementation of `dpnp.fft` module and adds
3838
* Added implementation of `dpnp.array_split`, `dpnp.split`, `dpnp.hsplit`, `dpnp.vsplit`, and `dpnp.dsplit` functions [#2017](https://github.com/IntelPython/dpnp/pull/2017)
3939
* Added runtime dependency on `intel-gpu-ocl-icd-system` package [#2023](https://github.com/IntelPython/dpnp/pull/2023)
4040
* Added implementation of `dpnp.ravel_multi_index` and `dpnp.unravel_index` functions [#2022](https://github.com/IntelPython/dpnp/pull/2022)
41+
* Added implementation of `dpnp.resize` and `dpnp.rot90` functions [#2030](https://github.com/IntelPython/dpnp/pull/2030)
4142

4243
### Change
4344

@@ -96,10 +97,11 @@ In addition, this release completes implementation of `dpnp.fft` module and adds
9697
* Added `copy` keyword to `dpnp.array` to align with NumPy 2.0 [#2006](https://github.com/IntelPython/dpnp/pull/2006)
9798
* Extended `dpnp.heaviside` to support `order` and `out` keyword arguments by writing dedicated kernel for it [#2008](https://github.com/IntelPython/dpnp/pull/2008)
9899
* `dpnp` uses pybind11 2.13.5 [#2010](https://github.com/IntelPython/dpnp/pull/2010)
99-
* Add `COMPILER_VERSION_2025_OR_LATER` flag to be able to run `dpnp.fft` module with both 2024.2 and 2025.0 versions of the compiler [#2025](https://github.com/IntelPython/dpnp/pull/2025)
100+
* Added `COMPILER_VERSION_2025_OR_LATER` flag to be able to run `dpnp.fft` module with both 2024.2 and 2025.0 versions of the compiler [#2025](https://github.com/IntelPython/dpnp/pull/2025)
100101
* Cleaned up an implementation of `dpnp.gradient` by removing obsolete TODO which is not going to be done [#2032](https://github.com/IntelPython/dpnp/pull/2032)
101102
* Updated `Array Manipulation Routines` page in documentation to add missing functions and to remove duplicate entries [#2033](https://github.com/IntelPython/dpnp/pull/2033)
102103
* `dpnp` uses pybind11 2.13.6 [#2041](https://github.com/IntelPython/dpnp/pull/2041)
104+
* Updated `dpnp.fft` backend to depend on `INTEL_MKL_VERSION` flag to ensures that the appropriate code segment is executed based on the version of OneMKL [#2035](https://github.com/IntelPython/dpnp/pull/2035)
103105

104106
### Fixed
105107

CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ else()
4646
find_package(oneDPL REQUIRED PATHS ${CMAKE_SOURCE_DIR}/dpnp/backend/cmake/Modules NO_DEFAULT_PATH)
4747
endif()
4848

49-
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "2025.0.0")
50-
add_definitions(-DCOMPILER_VERSION_2025_OR_LATER=1)
51-
else()
52-
add_definitions(-DCOMPILER_VERSION_2025_OR_LATER=0)
53-
endif()
54-
5549
include(GNUInstallDirs)
5650

5751
# Fetch pybind11

dpnp/backend/extensions/fft/common.hpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ class DescriptorWrapper
111111
const typename valT::value_type dim = get_dim();
112112

113113
valT fwd_strides(dim + 1);
114-
#if COMPILER_VERSION_2025_OR_LATER
114+
#if INTEL_MKL_VERSION >= 20250000
115115
descr_.get_value(mkl_dft::config_param::FWD_STRIDES, &fwd_strides);
116116
#else
117117
descr_.get_value(mkl_dft::config_param::FWD_STRIDES,
118118
fwd_strides.data());
119-
#endif // COMPILER_VERSION_2025_OR_LATER
119+
#endif // INTEL_MKL_VERSION
120120
return fwd_strides;
121121
}
122122

@@ -129,11 +129,11 @@ class DescriptorWrapper
129129
throw py::value_error(
130130
"Strides length does not match descriptor's dimension");
131131
}
132-
#if COMPILER_VERSION_2025_OR_LATER
132+
#if INTEL_MKL_VERSION >= 20250000
133133
descr_.set_value(mkl_dft::config_param::FWD_STRIDES, strides);
134134
#else
135135
descr_.set_value(mkl_dft::config_param::FWD_STRIDES, strides.data());
136-
#endif // COMPILER_VERSION_2025_OR_LATER
136+
#endif // INTEL_MKL_VERSION
137137
}
138138

139139
// config_param::BWD_STRIDES
@@ -143,12 +143,12 @@ class DescriptorWrapper
143143
const typename valT::value_type dim = get_dim();
144144

145145
valT bwd_strides(dim + 1);
146-
#if COMPILER_COMPILER_VERSION_2025_OR_LATER
146+
#if INTEL_MKL_VERSION >= 20250000
147147
descr_.get_value(mkl_dft::config_param::BWD_STRIDES, &bwd_strides);
148148
#else
149149
descr_.get_value(mkl_dft::config_param::BWD_STRIDES,
150150
bwd_strides.data());
151-
#endif // COMPILER_VERSION_2025_OR_LATER
151+
#endif // INTEL_MKL_VERSION
152152
return bwd_strides;
153153
}
154154

@@ -161,11 +161,11 @@ class DescriptorWrapper
161161
throw py::value_error(
162162
"Strides length does not match descriptor's dimension");
163163
}
164-
#if COMPILER_VERSION_2025_OR_LATER
164+
#if INTEL_MKL_VERSION >= 20250000
165165
descr_.set_value(mkl_dft::config_param::BWD_STRIDES, strides);
166166
#else
167167
descr_.set_value(mkl_dft::config_param::BWD_STRIDES, strides.data());
168-
#endif // COMPILER_VERSION_2025_OR_LATER
168+
#endif // INTEL_MKL_VERSION
169169
}
170170

171171
// config_param::FWD_DISTANCE
@@ -203,7 +203,7 @@ class DescriptorWrapper
203203
// config_param::PLACEMENT
204204
bool get_in_place()
205205
{
206-
#if defined(USE_ONEMKL_INTERFACES) || COMPILER_VERSION_2025_OR_LATER
206+
#if defined(USE_ONEMKL_INTERFACES) || INTEL_MKL_VERSION >= 20250000
207207
mkl_dft::config_value placement;
208208
descr_.get_value(mkl_dft::config_param::PLACEMENT, &placement);
209209
return (placement == mkl_dft::config_value::INPLACE);
@@ -212,12 +212,12 @@ class DescriptorWrapper
212212
DFTI_CONFIG_VALUE placement;
213213
descr_.get_value(mkl_dft::config_param::PLACEMENT, &placement);
214214
return (placement == DFTI_CONFIG_VALUE::DFTI_INPLACE);
215-
#endif // USE_ONEMKL_INTERFACES or COMPILER_VERSION_2025_OR_LATER
215+
#endif // USE_ONEMKL_INTERFACES or INTEL_MKL_VERSION
216216
}
217217

218218
void set_in_place(const bool &in_place_request)
219219
{
220-
#if defined(USE_ONEMKL_INTERFACES) || COMPILER_VERSION_2025_OR_LATER
220+
#if defined(USE_ONEMKL_INTERFACES) || INTEL_MKL_VERSION >= 20250000
221221
descr_.set_value(mkl_dft::config_param::PLACEMENT,
222222
(in_place_request)
223223
? mkl_dft::config_value::INPLACE
@@ -228,7 +228,7 @@ class DescriptorWrapper
228228
(in_place_request)
229229
? DFTI_CONFIG_VALUE::DFTI_INPLACE
230230
: DFTI_CONFIG_VALUE::DFTI_NOT_INPLACE);
231-
#endif // USE_ONEMKL_INTERFACES or COMPILER_VERSION_2025_OR_LATER
231+
#endif // USE_ONEMKL_INTERFACES or INTEL_MKL_VERSION
232232
}
233233

234234
// config_param::PRECISION
@@ -243,7 +243,7 @@ class DescriptorWrapper
243243
// config_param::COMMIT_STATUS
244244
bool is_committed()
245245
{
246-
#if defined(USE_ONEMKL_INTERFACES) || COMPILER_VERSION_2025_OR_LATER
246+
#if defined(USE_ONEMKL_INTERFACES) || INTEL_MKL_VERSION >= 20250000
247247
mkl_dft::config_value committed;
248248
descr_.get_value(mkl_dft::config_param::COMMIT_STATUS, &committed);
249249
return (committed == mkl_dft::config_value::COMMITTED);
@@ -252,7 +252,7 @@ class DescriptorWrapper
252252
DFTI_CONFIG_VALUE committed;
253253
descr_.get_value(mkl_dft::config_param::COMMIT_STATUS, &committed);
254254
return (committed == DFTI_CONFIG_VALUE::DFTI_COMMITTED);
255-
#endif // USE_ONEMKL_INTERFACES or COMPILER_VERSION_2025_OR_LATER
255+
#endif // USE_ONEMKL_INTERFACES or INTEL_MKL_VERSION
256256
}
257257

258258
private:

0 commit comments

Comments
 (0)