|
33 | 33 | #include "queue_sycl.hpp"
|
34 | 34 | #include <dpnp_iface.hpp>
|
35 | 35 |
|
| 36 | +/** |
| 37 | + * Version of SYCL DPC++ 2025.1 compiler where support of |
| 38 | + * sycl::ext::oneapi::experimental::properties was added. |
| 39 | + */ |
| 40 | +#ifndef __SYCL_COMPILER_REDUCTION_PROPERTIES_SUPPORT |
| 41 | +#define __SYCL_COMPILER_REDUCTION_PROPERTIES_SUPPORT 20241129 |
| 42 | +#endif |
| 43 | + |
36 | 44 | namespace mkl_blas = oneapi::mkl::blas;
|
37 | 45 | namespace mkl_blas_cm = oneapi::mkl::blas::column_major;
|
38 | 46 | namespace mkl_blas_rm = oneapi::mkl::blas::row_major;
|
39 | 47 | namespace mkl_lapack = oneapi::mkl::lapack;
|
40 | 48 |
|
| 49 | +#if __SYCL_COMPILER_VERSION >= __SYCL_COMPILER_REDUCTION_PROPERTIES_SUPPORT |
| 50 | +namespace syclex = sycl::ext::oneapi::experimental; |
| 51 | +#endif |
| 52 | + |
41 | 53 | template <typename _KernelNameSpecialization1,
|
42 | 54 | typename _KernelNameSpecialization2,
|
43 | 55 | typename _KernelNameSpecialization3>
|
@@ -76,8 +88,13 @@ sycl::event dot(sycl::queue &queue,
|
76 | 88 | cgh.parallel_for(
|
77 | 89 | sycl::range<1>{size},
|
78 | 90 | sycl::reduction(
|
79 |
| - result_out, std::plus<_DataType_output>(), |
80 |
| - sycl::property::reduction::initialize_to_identity{}), |
| 91 | + result_out, sycl::plus<_DataType_output>(), |
| 92 | +#if __SYCL_COMPILER_VERSION >= __SYCL_COMPILER_REDUCTION_PROPERTIES_SUPPORT |
| 93 | + syclex::properties(syclex::initialize_to_identity) |
| 94 | +#else |
| 95 | + sycl::property::reduction::initialize_to_identity {} |
| 96 | +#endif |
| 97 | + ), |
81 | 98 | [=](sycl::id<1> idx, auto &sum) {
|
82 | 99 | sum += static_cast<_DataType_output>(
|
83 | 100 | input1_in[idx * input1_strides]) *
|
|
0 commit comments