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