Skip to content

Commit 76f4a0c

Browse files
committed
readme: update GEMM API in examples and add cuRAND support
1 parent b90d4c7 commit 76f4a0c

File tree

3 files changed

+27
-17
lines changed

3 files changed

+27
-17
lines changed

README.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ oneMKL interfaces are an open-source implementation of the oneMKL Data Parallel
1313
</thead>
1414
<tbody>
1515
<tr>
16-
<td rowspan=4 align="center">oneMKL interface</td>
17-
<td rowspan=4 align="center">oneMKL selector</td>
16+
<td rowspan=5 align="center">oneMKL interface</td>
17+
<td rowspan=5 align="center">oneMKL selector</td>
1818
<td align="center"><a href="https://software.intel.com/en-us/oneapi/onemkl">Intel(R) oneAPI Math Kernel Library</a> for Intel CPU</td>
1919
<td align="center">Intel CPU</td>
2020
</tr>
@@ -26,6 +26,10 @@ oneMKL interfaces are an open-source implementation of the oneMKL Data Parallel
2626
<td align="center"><a href="https://developer.nvidia.com/cublas"> NVIDIA cuBLAS</a> for NVIDIA GPU </td>
2727
<td align="center">NVIDIA GPU</td>
2828
</tr>
29+
<tr>
30+
<td align="center"><a href="https://developer.nvidia.com/curand"> NVIDIA cuRAND</a> for NVIDIA GPU </td>
31+
<td align="center">NVIDIA GPU</td>
32+
</tr>
2933
<tr>
3034
<td align="center"><a href="https://ww.netlib.org"> NETLIB LAPACK</a> for INTEL CPU </td>
3135
<td align="center">INTEL CPU</td>
@@ -59,14 +63,14 @@ Example of app.cpp with run-time dispatching:
5963
#include "oneapi/mkl.hpp"
6064

6165
...
62-
cpu_dev = cl::sycl::device(cl::sycl::cpu_selector());
63-
gpu_dev = cl::sycl::device(cl::sycl::gpu_selector());
66+
cpu_dev = sycl::device(sycl::cpu_selector());
67+
gpu_dev = sycl::device(sycl::gpu_selector());
6468

65-
cl::sycl::queue cpu_queue(cpu_dev);
66-
cl::sycl::queue gpu_queue(gpu_dev);
69+
sycl::queue cpu_queue(cpu_dev);
70+
sycl::queue gpu_queue(gpu_dev);
6771

68-
oneapi::mkl::blas::gemm(cpu_queue, transA, transB, m, ...);
69-
oneapi::mkl::blas::gemm(gpu_queue, transA, transB, m, ...);
72+
oneapi::mkl::blas::column_major::gemm(cpu_queue, transA, transB, m, ...);
73+
oneapi::mkl::blas::column_major::gemm(gpu_queue, transA, transB, m, ...);
7074
```
7175
How to build an application with run-time dispatching:
7276
@@ -83,16 +87,16 @@ Example of app.cpp with compile-time dispatching:
8387
#include "oneapi/mkl.hpp"
8488

8589
...
86-
cpu_dev = cl::sycl::device(cl::sycl::cpu_selector());
87-
gpu_dev = cl::sycl::device(cl::sycl::gpu_selector());
90+
cpu_dev = sycl::device(sycl::cpu_selector());
91+
gpu_dev = sycl::device(sycl::gpu_selector());
8892

89-
cl::sycl::queue cpu_queue(cpu_dev);
90-
cl::sycl::queue gpu_queue(gpu_dev);
93+
sycl::queue cpu_queue(cpu_dev);
94+
sycl::queue gpu_queue(gpu_dev);
9195

9296
oneapi::mkl::backend_selector<oneapi::mkl::backend::mklcpu> cpu_selector(cpu_queue);
9397

94-
oneapi::mkl::blas::gemm(cpu_selector, transA, transB, m, ...);
95-
oneapi::mkl::blas::gemm(oneapi::mkl::backend_selector<oneapi::mkl::backend::cublas> {gpu_queue}, transA, transB, m, ...);
98+
oneapi::mkl::blas::column_major::gemm(cpu_selector, transA, transB, m, ...);
99+
oneapi::mkl::blas::column_major::gemm(oneapi::mkl::backend_selector<oneapi::mkl::backend::cublas> {gpu_queue}, transA, transB, m, ...);
96100
```
97101
How to build an application with compile-time dispatching:
98102
@@ -138,7 +142,7 @@ Supported domains: BLAS, RNG
138142
<td align="center">Dynamic, Static</td>
139143
</tr>
140144
<tr>
141-
<td rowspan=2 align="center">RNG</td>
145+
<td rowspan=3 align="center">RNG</td>
142146
<td align="center">Intel CPU</td>
143147
<td rowspan=2 align="center">Intel(R) oneAPI Math Kernel Library</td>
144148
<td align="center">Dynamic, Static</td>
@@ -147,6 +151,11 @@ Supported domains: BLAS, RNG
147151
<td align="center">Intel GPU</td>
148152
<td align="center">Dynamic, Static</td>
149153
</tr>
154+
<tr>
155+
<td align="center">NVIDIA GPU</td>
156+
<td align="center">NVIDIA cuRAND</td>
157+
<td align="center">Dynamic, Static</td>
158+
</tr>
150159
</tbody>
151160
</table>
152161

@@ -512,6 +521,7 @@ build_shared_libs | BUILD_SHARED_LIBS | True, False | True
512521
enable_mklcpu_backend | ENABLE_MKLCPU_BACKEND | True, False | True
513522
enable_mklgpu_backend | ENABLE_MKLGPU_BACKEND | True, False | True
514523
*Not Supported* | ENABLE_CUBLAS_BACKEND | True, False | False
524+
*Not Supported* | ENABLE_CURAND_BACKEND | True, False | False
515525
*Not Supported* | ENABLE_NETLIB_BACKEND | True, False | False
516526
enable_mklcpu_thread_tbb | ENABLE_MKLCPU_THREAD_TBB | True, False | True
517527
build_functional_tests | BUILD_FUNCTIONAL_TESTS | True, False | True

include/oneapi/mkl/rng/detail/curand/onemkl_rng_curand.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2020 Intel Corporation
2+
* Copyright 2020-2021 Intel Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/rng/backends/curand/mrg32k3a.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2020 Intel Corporation
2+
* Copyright 2020-2021 Intel Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)