Skip to content

Commit 3a41ae1

Browse files
committed
Add README
1 parent 9284357 commit 3a41ae1

File tree

1 file changed

+42
-23
lines changed
  • DirectProgramming/C++SYCL/guided_cuRAND_examples_SYCL_migration

1 file changed

+42
-23
lines changed

DirectProgramming/C++SYCL/guided_cuRAND_examples_SYCL_migration/README.md

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# `cuBLAS Migration` Sample
1+
# `cuRAND Migration` Sample
22

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).
44

55
| Area | Description
66
|:--- |:---
77
| 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
99
| Category | Code Optimization
1010

1111
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
1414

1515
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.
1616

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.
1818

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.
2020
2121
## Prerequisites
2222

@@ -35,17 +35,13 @@ This sample contains two sets of sources in the following folders:
3535
| `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.)
3636
| `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.
3737

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:
4339

4440
## Set Environment Variables
4541

4642
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.
4743

48-
## Build the `cuBLAS Migration` Sample
44+
## Build the `cuRAND Migration` Sample
4945

5046
> **Note**: If you have not already done so, set up your CLI
5147
> environment by sourcing the `setvars` script in the root of your oneAPI installation.
@@ -80,18 +76,18 @@ make VERBOSE=1
8076
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.
8177

8278

83-
## Run the `cuBLAS Migration` Sample
79+
## Run the `cuRAND Migration` Sample
8480

8581
### On Linux
8682

8783
Run the programs on a CPU or GPU. Each sample uses a default device, which in most cases is a GPU.
8884

8985
1. Run the samples in the `02_sycl_dpct_migrated` folder.
9086
```
91-
make run_amax
87+
make run_mt19937_uniform
9288
```
9389

94-
### Build and Run the `cuBLAS Migration` Sample in Intel® DevCloud (Optional)
90+
### Build and Run the `cuRAND Migration` Sample in Intel® DevCloud (Optional)
9591

9692
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/).
9793

@@ -136,19 +132,42 @@ You can submit build and run jobs through a Portable Bash Script (PBS). A job is
136132

137133
## Example Output
138134

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`.
140136

141137
```
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
140+
[100%] Linking CXX executable ../../bin/mt19937_uniform
141+
[100%] Built target mt19937_uniform
142+
Host
143+
0.966454
144+
0.778166
145+
0.440733
146+
0.116851
147+
0.007491
148+
0.090644
149+
0.910976
150+
0.942535
151+
0.939269
152+
0.807002
153+
0.582228
154+
0.034926
147155
=====
148-
result
149-
4
156+
Device
157+
0.966454
158+
0.778166
159+
0.440733
160+
0.116851
161+
0.007491
162+
0.090644
163+
0.910976
164+
0.942535
165+
0.939269
166+
0.807002
167+
0.582228
168+
0.034926
150169
=====
151-
[100%] Built target run_amax
170+
[100%] Built target run_mt19937_uniform
152171
```
153172

154173
## License

0 commit comments

Comments
 (0)