Skip to content

Commit 05b26d0

Browse files
Update deprecated functionality for SYCL 2020 specification (#167)
1 parent 560a2e3 commit 05b26d0

File tree

295 files changed

+28574
-29130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

295 files changed

+28574
-29130
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ if(WIN32 AND ONEMKL_SYCL_IMPLEMENTATION STREQUAL "dpc++")
143143
set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> -fsycl /nologo <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
144144
endif()
145145

146-
# Temporary disable sycl 2020 deprecations warnings
147-
if(ONEMKL_SYCL_IMPLEMENTATION STREQUAL "dpc++")
146+
# Temporary disable sycl 2020 deprecations warnings for cuBLAS and cuSOLVER
147+
if(ONEMKL_SYCL_IMPLEMENTATION STREQUAL "dpc++" AND (ENABLE_CUBLAS_BACKEND OR ENABLE_CUSOLVER_BACKEND))
148148
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSYCL2020_DISABLE_DEPRECATION_WARNINGS")
149149
endif()
150150

docs/create_new_backend.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Code snippet of the generated header file ``include/oneapi/mkl/blas/detail/newli
5656
namespace mkl {
5757
namespace newlib {
5858
59-
void asum(cl::sycl::queue &queue, std::int64_t n, cl::sycl::buffer<float, 1> &x, std::int64_t incx,
60-
cl::sycl::buffer<float, 1> &result);
59+
void asum(sycl::queue &queue, std::int64_t n, sycl::buffer<float, 1> &x, std::int64_t incx,
60+
sycl::buffer<float, 1> &result);
6161
6262
6363
@@ -81,9 +81,9 @@ Code snippet of the generated header file ``include/oneapi/mkl/blas/detail/newli
8181
namespace blas {
8282
8383
template <>
84-
void asum<library::newlib, backend::newdevice>(cl::sycl::queue &queue, std::int64_t n,
85-
cl::sycl::buffer<float, 1> &x, std::int64_t incx,
86-
cl::sycl::buffer<float, 1> &result) {
84+
void asum<library::newlib, backend::newdevice>(sycl::queue &queue, std::int64_t n,
85+
sycl::buffer<float, 1> &x, std::int64_t incx,
86+
sycl::buffer<float, 1> &result) {
8787
asum_precondition(queue, n, x, incx, result);
8888
oneapi::mkl::newlib::asum(queue, n, x, incx, result);
8989
asum_postcondition(queue, n, x, incx, result);
@@ -174,7 +174,7 @@ To integrate the new third-party library to a oneMKL header-based part, followin
174174

175175
.. code-block:: diff
176176
177-
inline oneapi::mkl::device get_device_id(cl::sycl::queue &queue) {
177+
inline oneapi::mkl::device get_device_id(sycl::queue &queue) {
178178
oneapi::mkl::device device_id;
179179
+ if (queue.is_host())
180180
+ device_id=device::newdevice;
@@ -282,20 +282,20 @@ The following code snippet is updated for ``src/blas/backends/newlib/newlib_wrap
282282
namespace mkl {
283283
namespace newlib {
284284
285-
void asum(cl::sycl::queue &queue, std::int64_t n, cl::sycl::buffer<float, 1> &x, std::int64_t incx,
286-
cl::sycl::buffer<float, 1> &result) {
285+
void asum(sycl::queue &queue, std::int64_t n, sycl::buffer<float, 1> &x, std::int64_t incx,
286+
sycl::buffer<float, 1> &result) {
287287
- throw std::runtime_error("Not implemented for newlib");
288-
+ queue.submit([&](cl::sycl::handler &cgh) {
289-
+ auto accessor_x = x.get_access<cl::sycl::access::mode::read>(cgh);
290-
+ auto accessor_result = result.get_access<cl::sycl::access::mode::write>(cgh);
288+
+ queue.submit([&](sycl::handler &cgh) {
289+
+ auto accessor_x = x.get_access<sycl::access::mode::read>(cgh);
290+
+ auto accessor_result = result.get_access<sycl::access::mode::write>(cgh);
291291
+ cgh.single_task<class newlib_sasum>([=]() {
292292
+ accessor_result[0] = ::newlib_sasum((const int)n, accessor_x.get_pointer(), (const int)incx);
293293
+ });
294294
+ });
295295
}
296296
297-
void asum(cl::sycl::queue &queue, std::int64_t n, cl::sycl::buffer<double, 1> &x, std::int64_t incx,
298-
cl::sycl::buffer<double, 1> &result) {
297+
void asum(sycl::queue &queue, std::int64_t n, sycl::buffer<double, 1> &x, std::int64_t incx,
298+
sycl::buffer<double, 1> &result) {
299299
throw std::runtime_error("Not implemented for newlib");
300300
}
301301
@@ -492,7 +492,7 @@ Update the following files to enable the new third-party library for unit tests:
492492
}
493493
+
494494
+ #ifdef ENABLE_NEWLIB_BACKEND
495-
+ devices.push_back(cl::sycl::device(cl::sycl::host_selector()));
495+
+ devices.push_back(sycl::device(sycl::host_selector()));
496496
+ #endif
497497
498498
Now you can build and run functional testing for enabled third-party libraries (for more information see `Build with cmake <../README.md#building-with-cmake>`_).

docs/domains/lapack/gebrd.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ gebrd (Buffer Version)
6969
.. code-block:: cpp
7070
7171
namespace oneapi::mkl::lapack {
72-
void gebrd(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, cl::sycl::buffer<T,1> &a, std::int64_t lda, cl::sycl::buffer<realT,1> &d, cl::sycl::buffer<realT,1> &e, cl::sycl::buffer<T,1> &tauq, cl::sycl::buffer<T,1> &taup, cl::sycl::buffer<T,1> &scratchpad, std::int64_t scratchpad_size)
72+
void gebrd(sycl::queue &queue, std::int64_t m, std::int64_t n, sycl::buffer<T,1> &a, std::int64_t lda, sycl::buffer<realT,1> &d, sycl::buffer<realT,1> &e, sycl::buffer<T,1> &tauq, sycl::buffer<T,1> &taup, sycl::buffer<T,1> &scratchpad, std::int64_t scratchpad_size)
7373
}
7474
7575
.. container:: section
@@ -148,7 +148,7 @@ gebrd (USM Version)
148148
.. code-block:: cpp
149149
150150
namespace oneapi::mkl::lapack {
151-
cl::sycl::event gebrd(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, T *a, std::int64_t lda, RealT *d, RealT *e, T *tauq, T *taup, T *scratchpad, std::int64_t scratchpad_size, const cl::sycl::vector_class<cl::sycl::event> &events = {})
151+
sycl::event gebrd(sycl::queue &queue, std::int64_t m, std::int64_t n, T *a, std::int64_t lda, RealT *d, RealT *e, T *tauq, T *taup, T *scratchpad, std::int64_t scratchpad_size, const std::vector<sycl::event> &events = {})
152152
}
153153
154154
.. container:: section

docs/domains/lapack/gebrd_scratchpad_size.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Calls to this routine must specify the template parameter explicitly.
3131
3232
namespace oneapi::mkl::lapack {
3333
template <typename T>
34-
std::int64_t gebrd_scratchpad_size(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, std::int64_t lda)
34+
std::int64_t gebrd_scratchpad_size(sycl::queue &queue, std::int64_t m, std::int64_t n, std::int64_t lda)
3535
}
3636
3737
.. container:: section

docs/domains/lapack/geqrf.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ geqrf (Buffer Version)
3838
.. code-block:: cpp
3939
4040
namespace oneapi::mkl::lapack {
41-
void geqrf(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, cl::sycl::buffer<T,1> &a, std::int64_t lda, cl::sycl::buffer<T,1> &tau, cl::sycl::buffer<T,1> &scratchpad, std::int64_t scratchpad_size)
41+
void geqrf(sycl::queue &queue, std::int64_t m, std::int64_t n, sycl::buffer<T,1> &a, std::int64_t lda, sycl::buffer<T,1> &tau, sycl::buffer<T,1> &scratchpad, std::int64_t scratchpad_size)
4242
}
4343
4444
.. container:: section
@@ -94,7 +94,7 @@ geqrf (USM Version)
9494
.. code-block:: cpp
9595
9696
namespace oneapi::mkl::lapack {
97-
cl::sycl::event geqrf(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, T *a, std::int64_t lda, T *tau, T *scratchpad, std::int64_t scratchpad_size, const cl::sycl::vector_class<cl::sycl::event> &events = {})
97+
sycl::event geqrf(sycl::queue &queue, std::int64_t m, std::int64_t n, T *a, std::int64_t lda, T *tau, T *scratchpad, std::int64_t scratchpad_size, const std::vector<sycl::event> &events = {})
9898
}
9999
100100
.. container:: section

docs/domains/lapack/geqrf_batch.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The buffer version of ``geqrf_batch`` supports only the strided API.
4444
.. code-block:: cpp
4545
4646
namespace oneapi::mkl::lapack {
47-
void geqrf_batch(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, cl::sycl::buffer<T> &a, std::int64_t lda, std::int64_t stride_a, cl::sycl::buffer<T> &tau, std::int64_t stride_tau, std::int64_t batch_size, cl::sycl::buffer<T> &scratchpad, std::int64_t scratchpad_size)
47+
void geqrf_batch(sycl::queue &queue, std::int64_t m, std::int64_t n, sycl::buffer<T> &a, std::int64_t lda, std::int64_t stride_a, sycl::buffer<T> &tau, std::int64_t stride_tau, std::int64_t batch_size, sycl::buffer<T> &scratchpad, std::int64_t scratchpad_size)
4848
}
4949
5050
.. container:: section
@@ -114,7 +114,7 @@ The total number of problems to solve, ``batch_size``, is a sum of sizes of all
114114
.. code-block:: cpp
115115
116116
namespace oneapi::mkl::lapack {
117-
cl::sycl::event geqrf_batch(cl::sycl::queue &queue, std::int64_t *m, std::int64_t *n, T **a, std::int64_t *lda, T **tau, std::int64_t group_count, std::int64_t *group_sizes, T *scratchpad, std::int64_t scratchpad_size, const cl::sycl::vector_class<cl::sycl::event> &events = {})
117+
sycl::event geqrf_batch(sycl::queue &queue, std::int64_t *m, std::int64_t *n, T **a, std::int64_t *lda, T **tau, std::int64_t group_count, std::int64_t *group_sizes, T *scratchpad, std::int64_t scratchpad_size, const std::vector<sycl::event> &events = {})
118118
}
119119
120120
.. container:: section
@@ -180,7 +180,7 @@ The routine does not form the matrices :math:`Q_i` explicitly. Instead, :math:`Q
180180
.. code-block:: cpp
181181
182182
namespace oneapi::mkl::lapack {
183-
sycl::event geqrf_batch(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, T *a, std::int64_t lda, std::int64_t stride_a, T *tau, std::int64_t stride_tau, std::int64_t batch_size, T *scratchpad, std::int64_t scratchpad_size, const cl::sycl::vector_class<cl::sycl::event> &events = {})
183+
sycl::event geqrf_batch(sycl::queue &queue, std::int64_t m, std::int64_t n, T *a, std::int64_t lda, std::int64_t stride_a, T *tau, std::int64_t stride_tau, std::int64_t batch_size, T *scratchpad, std::int64_t scratchpad_size, const std::vector<sycl::event> &events = {})
184184
}
185185
186186
.. container:: section

docs/domains/lapack/geqrf_batch_scratchpad_size.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Computes the number of elements of type ``T`` the scratchpad memory should able
3232
3333
namespace oneapi::mkl::lapack {
3434
template <typename T>
35-
std::int64_t geqrf_batch_scratchpad_size(cl::sycl::queue &queue, std::int64_t *m, std::int64_t *n, std::int64_t *lda, std::int64_t group_count, std::int64_t *group_sizes)
35+
std::int64_t geqrf_batch_scratchpad_size(sycl::queue &queue, std::int64_t *m, std::int64_t *n, std::int64_t *lda, std::int64_t group_count, std::int64_t *group_sizes)
3636
}
3737
3838
.. container:: section
@@ -74,7 +74,7 @@ Computes the number of elements of type ``T`` the scratchpad memory should able
7474
7575
namespace oneapi::mkl::lapack {
7676
template <typename T>
77-
std::int64_t geqrf_batch_scratchpad_size(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, std::int64_t lda, std::int64_t stride_a, std::int64_t stride_tau, std::int64_t batch_size)
77+
std::int64_t geqrf_batch_scratchpad_size(sycl::queue &queue, std::int64_t m, std::int64_t n, std::int64_t lda, std::int64_t stride_a, std::int64_t stride_tau, std::int64_t batch_size)
7878
};
7979
8080
.. container:: section

docs/domains/lapack/geqrf_scratchpad_size.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Calls to this routine must specify the template parameter explicitly.
3535
3636
namespace oneapi::mkl::lapack {
3737
template <typename T>
38-
std::int64_t geqrf_scratchpad_size(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, std::int64_t lda)
38+
std::int64_t geqrf_scratchpad_size(sycl::queue &queue, std::int64_t m, std::int64_t n, std::int64_t lda)
3939
}
4040
4141
.. container:: section

docs/domains/lapack/gerqf.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ gerqf (Buffer Version)
3737
.. code-block:: cpp
3838
3939
namespace oneapi::mkl::lapack {
40-
void gerqf(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, cl::sycl::buffer<T> &a, std::int64_t lda, cl::sycl::buffer<T> &tau, cl::sycl::buffer<T> &scratchpad, std::int64_t scratchpad_size)
40+
void gerqf(sycl::queue &queue, std::int64_t m, std::int64_t n, sycl::buffer<T> &a, std::int64_t lda, sycl::buffer<T> &tau, sycl::buffer<T> &scratchpad, std::int64_t scratchpad_size)
4141
}
4242
4343
.. container:: section
@@ -91,7 +91,7 @@ gerqf (USM Version)
9191
.. code-block:: cpp
9292
9393
namespace oneapi::mkl::lapack {
94-
cl::sycl::event gerqf(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, T *a, std::int64_t lda, T *tau, T *scratchpad, std::int64_t scratchpad_size, const cl::sycl::vector_class<cl::sycl::event> &events = {})
94+
sycl::event gerqf(sycl::queue &queue, std::int64_t m, std::int64_t n, T *a, std::int64_t lda, T *tau, T *scratchpad, std::int64_t scratchpad_size, const std::vector<sycl::event> &events = {})
9595
}
9696
9797
.. container:: section

docs/domains/lapack/gerqf_scratchpad_size.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ gerqf_scratchpad_size
3939
4040
namespace oneapi::mkl::lapack {
4141
template <typename T>
42-
std::int64_t gerqf_scratchpad_size(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, std::int64_t lda)
42+
std::int64_t gerqf_scratchpad_size(sycl::queue &queue, std::int64_t m, std::int64_t n, std::int64_t lda)
4343
}
4444
4545
.. container:: section

0 commit comments

Comments
 (0)