Skip to content

Commit a30705e

Browse files
authored
Merge branch 'master' into add_versioneer
2 parents 4c0ec5d + aa4687e commit a30705e

File tree

5 files changed

+24
-39
lines changed

5 files changed

+24
-39
lines changed

conda-recipe/meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ requirements:
1414
- ninja
1515
- git
1616
- dpctl >=0.14.5
17-
- mkl-devel-dpcpp {{ environ.get('MKL_VER', '>=2023.1.0') }}
17+
- mkl-devel-dpcpp {{ environ.get('MKL_VER', '>=2023.2.0') }}
1818
- onedpl-devel
1919
- tbb-devel
2020
- wheel
2121
- scikit-build
2222
build:
2323
- {{ compiler('cxx') }}
24-
- {{ compiler('dpcpp') }} >=2023.1.0 # [not osx]
24+
- {{ compiler('dpcpp') }} >=2023.2.0 # [not osx]
2525
- sysroot_linux-64 >=2.28 # [linux]
2626
run:
2727
- python

dpnp/backend/extensions/vm/common.hpp

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
#include "utils/type_dispatch.hpp"
3838
#include "utils/type_utils.hpp"
3939

40+
#include "dpnp_utils.hpp"
41+
42+
static_assert(INTEL_MKL_VERSION >= __INTEL_MKL_2023_2_0_VERSION_REQUIRED,
43+
"OneMKL does not meet minimum version requirement");
44+
4045
// OneMKL namespace with VM functions
4146
namespace mkl_vm = oneapi::mkl::vm;
4247

@@ -272,7 +277,6 @@ bool need_to_call_unary_ufunc(sycl::queue exec_q,
272277
dpctl::tensor::usm_ndarray dst,
273278
const dispatchT &dispatch_vector)
274279
{
275-
#if INTEL_MKL_VERSION >= 20230002
276280
// check type_nums
277281
int src_typenum = src.get_typenum();
278282
int dst_typenum = dst.get_typenum();
@@ -356,16 +360,6 @@ bool need_to_call_unary_ufunc(sycl::queue exec_q,
356360
return false;
357361
}
358362
return true;
359-
#else
360-
// In OneMKL 2023.1.0 the call of oneapi::mkl::vm::div() is going to dead
361-
// lock inside ~usm_wrapper_to_host()->{...; q_->wait_and_throw(); ...}
362-
363-
(void)exec_q;
364-
(void)src;
365-
(void)dst;
366-
(void)dispatch_vector;
367-
return false;
368-
#endif // INTEL_MKL_VERSION >= 20230002
369363
}
370364

371365
template <typename dispatchT>
@@ -375,7 +369,6 @@ bool need_to_call_binary_ufunc(sycl::queue exec_q,
375369
dpctl::tensor::usm_ndarray dst,
376370
const dispatchT &dispatch_vector)
377371
{
378-
#if INTEL_MKL_VERSION >= 20230002
379372
// check type_nums
380373
int src1_typenum = src1.get_typenum();
381374
int src2_typenum = src2.get_typenum();
@@ -465,17 +458,6 @@ bool need_to_call_binary_ufunc(sycl::queue exec_q,
465458
return false;
466459
}
467460
return true;
468-
#else
469-
// In OneMKL 2023.1.0 the call of oneapi::mkl::vm::div() is going to dead
470-
// lock inside ~usm_wrapper_to_host()->{...; q_->wait_and_throw(); ...}
471-
472-
(void)exec_q;
473-
(void)src1;
474-
(void)src2;
475-
(void)dst;
476-
(void)dispatch_vector;
477-
return false;
478-
#endif // INTEL_MKL_VERSION >= 20230002
479461
}
480462

481463
template <typename dispatchT,

dpnp/backend/kernels/dpnp_krnl_mathematical.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
#include "dpnpc_memory_adapter.hpp"
3636
#include "queue_sycl.hpp"
3737

38+
static_assert(__SYCL_COMPILER_VERSION >= __SYCL_COMPILER_VECTOR_ABS_CHANGED,
39+
"SYCL DPC++ compiler does not meet minimum version requirement");
40+
3841
template <typename _KernelNameSpecialization>
3942
class dpnp_around_c_kernel;
4043

@@ -180,18 +183,8 @@ DPCTLSyclEventRef
180183
sycl::vec<_DataType_input, vec_sz> data_vec =
181184
sg.load<vec_sz>(input_ptrT(&array1[start]));
182185

183-
#if (__SYCL_COMPILER_VERSION < __SYCL_COMPILER_VECTOR_ABS_CHANGED)
184-
// sycl::abs() returns unsigned integers only, so explicit
185-
// casting to signed ones is required
186-
using result_absT = typename cl::sycl::detail::make_unsigned<
187-
_DataType_output>::type;
188-
sycl::vec<_DataType_output, vec_sz> res_vec =
189-
dpnp_vec_cast<_DataType_output, result_absT, vec_sz>(
190-
sycl::abs(data_vec));
191-
#else
192186
sycl::vec<_DataType_output, vec_sz> res_vec =
193187
sycl::abs(data_vec);
194-
#endif
195188

196189
sg.store<vec_sz>(result_ptrT(&result[start]), res_vec);
197190
}

dpnp/backend/kernels/dpnp_krnl_random.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
#include "dpnpc_memory_adapter.hpp"
3838
#include "queue_sycl.hpp"
3939

40-
static_assert(INTEL_MKL_VERSION >= __INTEL_MKL_2023_VERSION_REQUIRED,
41-
"MKL does not meet minimum version requirement");
40+
static_assert(INTEL_MKL_VERSION >= __INTEL_MKL_2023_0_0_VERSION_REQUIRED,
41+
"OneMKL does not meet minimum version requirement");
4242

4343
namespace mkl_blas = oneapi::mkl::blas;
4444
namespace mkl_rng = oneapi::mkl::rng;

dpnp/backend/src/dpnp_utils.hpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,18 @@
6464
/**
6565
* Version of Intel MKL at which transition to OneMKL release 2023.0.0 occurs.
6666
*/
67-
#ifndef __INTEL_MKL_2023_VERSION_REQUIRED
68-
#define __INTEL_MKL_2023_VERSION_REQUIRED 20230000
67+
#ifndef __INTEL_MKL_2023_0_0_VERSION_REQUIRED
68+
#define __INTEL_MKL_2023_0_0_VERSION_REQUIRED 20230000
69+
#endif
70+
71+
/**
72+
* Version of Intel MKL at which transition to OneMKL release 2023.2.0 occurs.
73+
*
74+
* @note with OneMKL=2023.1.0 the call of oneapi::mkl::vm::div() was dead
75+
* locked inside ~usm_wrapper_to_host()->{...; q_->wait_and_throw(); ...}
76+
*/
77+
#ifndef __INTEL_MKL_2023_2_0_VERSION_REQUIRED
78+
#define __INTEL_MKL_2023_2_0_VERSION_REQUIRED 20230002L
6979
#endif
7080

7181
/**

0 commit comments

Comments
 (0)