You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DirectProgramming/C++SYCL/guided_cuRAND_examples_SYCL_migration/README.md
+42-23Lines changed: 42 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
-
# `cuBLAS Migration` Sample
1
+
# `cuRAND Migration` Sample
2
2
3
-
The `cuBLAS Migration` sample is a collection of code samples that demonstrate the cuBLAS equivalent in Intel® oneAPI Math Kernel Library (oneMKL).
3
+
The `cuRAND Migration` sample is a collection of code samples that demonstrate the cuBLAS equivalent in Intel® oneAPI Math Kernel Library (oneMKL).
4
4
5
5
| Area | Description
6
6
|:--- |:---
7
7
| What you will learn | How to begin migrating CUDA code to a SYCL*-compliant equivalent
8
-
| Time to complete | 90 minutes
8
+
| Time to complete | 30 minutes
9
9
| Category | Code Optimization
10
10
11
11
For more information on oneMKL and complete documentation of all oneMKL routines, see https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-documentation.html.
@@ -14,9 +14,9 @@ For more information on oneMKL and complete documentation of all oneMKL routines
14
14
15
15
The samples source code using SYCL were migrated from CUDA source code for offloading computations to a GPU/CPU. The sample demonstrates how to migrate code to SYCL, optimize the migration steps, and improve processing time.
16
16
17
-
Each of the cuBLAS samples source files shows the usage of oneMKL cuBLAS routines. All are basic programs containing the usage of a single function.
17
+
Each of the cuRAND samples source files shows the usage of different oneMKL cuRAND routines. All are basic programs containing the usage of a single method of generating pseudorandom numbers.
18
18
19
-
>**Note**: This sample is based on the [*cuBLAS Library - APIs Examples*](https://github.com/NVIDIA/CUDALibrarySamples/tree/master/cuBLAS) samples in the NVIDIA/CUDALibrary GitHub repository.
19
+
>**Note**: This sample is based on the [*cuRAND Library - APIs Examples*](https://github.com/NVIDIA/CUDALibrarySamples/tree/master/cuRAND) samples in the NVIDIA/CUDALibrary GitHub repository.
20
20
21
21
## Prerequisites
22
22
@@ -35,17 +35,13 @@ This sample contains two sets of sources in the following folders:
35
35
| `01_sycl_dpct_output` | Contains output of Intel® DPC++ Compatibility Tool used to migrate SYCL-compliant code from CUDA code. <br> This SYCL code has some unmigrated or incorrectly generated code that has to be manually fixed before it is functional. (The code does not work as supplied.)
36
36
| `02_sycl_dpct_migrated` | Contains SYCL to CUDA migrated code generated by using the Intel® DPC++ Compatibility Tool with the manual changes implemented to make the code fully functional.
37
37
38
-
These functions are classified into three levels of difficulty. There are **52** samples:
39
-
40
-
-**14** Level 1 samples
41
-
-**23** Level 2 samples
42
-
-**15** Level 3 samples
38
+
These functions are classified into eight different directories, each based on a RNG engine. There are **48** samples:
43
39
44
40
## Set Environment Variables
45
41
46
42
When working with the command-line interface (CLI), you should configure the oneAPI toolkits using environment variables. Set up your CLI environment by sourcing the `setvars` script every time you open a new terminal window. This practice ensures that your compiler, libraries, and tools are ready for development.
47
43
48
-
## Build the `cuBLAS Migration` Sample
44
+
## Build the `cuRAND Migration` Sample
49
45
50
46
> **Note**: If you have not already done so, set up your CLI
51
47
> environment by sourcing the `setvars` script in the root of your oneAPI installation.
@@ -80,18 +76,18 @@ make VERBOSE=1
80
76
If you receive an error message, troubleshoot the problem using the **Diagnostics Utility for Intel® oneAPI Toolkits**. The diagnostic utility provides configuration and system checks to help find missing dependencies, permissions errors, and other issues. See the [Diagnostics Utility for Intel® oneAPI Toolkits User Guide](https://www.intel.com/content/www/us/en/develop/documentation/diagnostic-utility-user-guide/top.html) for more information on using the utility.
81
77
82
78
83
-
## Run the `cuBLAS Migration` Sample
79
+
## Run the `cuRAND Migration` Sample
84
80
85
81
### On Linux
86
82
87
83
Run the programs on a CPU or GPU. Each sample uses a default device, which in most cases is a GPU.
88
84
89
85
1. Run the samples in the `02_sycl_dpct_migrated` folder.
90
86
```
91
-
make run_amax
87
+
make run_mt19937_uniform
92
88
```
93
89
94
-
### Build and Run the `cuBLAS Migration` Sample in Intel® DevCloud (Optional)
90
+
### Build and Run the `cuRAND Migration` Sample in Intel® DevCloud (Optional)
95
91
96
92
When running a sample in the Intel® DevCloud, you must specify the compute node (CPU, GPU, FPGA) and whether to run in batch or interactive mode. For more information, see the Intel® oneAPI Base Toolkit [Get Started Guide](https://devcloud.intel.com/oneapi/get_started/).
97
93
@@ -136,19 +132,42 @@ You can submit build and run jobs through a Portable Bash Script (PBS). A job is
136
132
137
133
## Example Output
138
134
139
-
This is example output if you built the default and ran `run_amax`.
135
+
This is example output if you built the default and ran `run_mt19937_uniform`.
140
136
141
137
```
142
-
[ 0%] Building CXX object 02_sycl_dpct_migrated/Level-1/CMakeFiles/amax.dir/amax.cpp.o
143
-
[100%] Linking CXX executable amax
144
-
[100%] Built target amax
145
-
A
146
-
1.00 2.00 3.00 4.00
138
+
Scanning dependencies of target mt19937_uniform
139
+
[ 50%] Building CXX object 02_sycl_dpct_migrated/mt19937/CMakeFiles/mt19937_uniform.dir/mt19937_uniform.cpp.o
0 commit comments