Skip to content

Commit dfc3ef9

Browse files
authored
jupyter document fixes for IDC (#1990)
1 parent 7a0c7fa commit dfc3ef9

8 files changed

Lines changed: 56 additions & 26 deletions

File tree

DirectProgramming/C++SYCL/Jupyter/cuda-to-sycl-migration-training/01_SYCL_Migration_Simple_VectorAdd/01_SYCL_Migration_Simple_VectorAdd.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@
274274
"metadata": {},
275275
"outputs": [],
276276
"source": [
277-
"! ./q.sh run_vector_add.sh gen9"
277+
"! ./q.sh run_vector_add.sh"
278278
]
279279
},
280280
{
@@ -441,7 +441,7 @@
441441
"metadata": {},
442442
"outputs": [],
443443
"source": [
444-
"! ./q.sh run_vector_add_optimized.sh gen9"
444+
"! ./q.sh run_vector_add_optimized.sh"
445445
]
446446
},
447447
{
@@ -474,9 +474,9 @@
474474
],
475475
"metadata": {
476476
"kernelspec": {
477-
"display_name": "Python 3 (Intel® oneAPI 2023.2)",
477+
"display_name": "Python 3 (ipykernel)",
478478
"language": "python",
479-
"name": "c009-intel_distribution_of_python_3_oneapi-beta05-python"
479+
"name": "python3"
480480
},
481481
"language_info": {
482482
"codemirror_mode": {
@@ -488,7 +488,7 @@
488488
"name": "python",
489489
"nbconvert_exporter": "python",
490490
"pygments_lexer": "ipython3",
491-
"version": "3.9.16"
491+
"version": "3.11.5"
492492
}
493493
},
494494
"nbformat": 4,

DirectProgramming/C++SYCL/Jupyter/cuda-to-sycl-migration-training/02_SYCL_Migration_SortingNetworks/02_SYCL_Migration_SortingNetworks.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
"metadata": {},
250250
"outputs": [],
251251
"source": [
252-
"! ./q.sh run_sycl_migrated.sh gen9"
252+
"! ./q.sh run_sycl_migrated.sh"
253253
]
254254
},
255255
{
@@ -335,9 +335,9 @@
335335
],
336336
"metadata": {
337337
"kernelspec": {
338-
"display_name": "Python 3 (Intel® oneAPI 2023.2)",
338+
"display_name": "Python 3 (ipykernel)",
339339
"language": "python",
340-
"name": "c009-intel_distribution_of_python_3_oneapi-beta05-python"
340+
"name": "python3"
341341
},
342342
"language_info": {
343343
"codemirror_mode": {
@@ -349,7 +349,7 @@
349349
"name": "python",
350350
"nbconvert_exporter": "python",
351351
"pygments_lexer": "ipython3",
352-
"version": "3.9.16"
352+
"version": "3.11.5"
353353
}
354354
},
355355
"nbformat": 4,

DirectProgramming/C++SYCL/Jupyter/cuda-to-sycl-migration-training/03_SYCL_Migration_Jacobi_Iterative/03_SYCL_Migration_Jacobi_Iterative.ipynb

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@
288288
"metadata": {},
289289
"outputs": [],
290290
"source": [
291-
"! ./q.sh run_sycl_migrated.sh gen9"
291+
"! ./q.sh run_sycl_migrated.sh"
292292
]
293293
},
294294
{
@@ -410,7 +410,24 @@
410410
"\n",
411411
"The migrated code uses the same Work-group and Sub-group sizes used in the original CUDA source, these can be optimized depending on the device support and occupancy for the device used for offload.\n",
412412
"\n",
413-
"The `sycl_migrated_optimized` folder has C++ SYCL source code with the above changes implemented."
413+
"The `sycl_migrated_optimized` folder has C++ SYCL source code with the above changes implemented.\n",
414+
"\n",
415+
"### Compile and Run the migrated optimized SYCL source\n",
416+
"\n",
417+
"Once you have successfully migrated the CUDA source to the SYCL source, verify that the migrated SYCL code is functioning correctly by compiling and running it on the Intel Developer Cloud, which has a variety of Intel CPUs and GPUs available for development.\n",
418+
"\n",
419+
"#### Build and Run\n",
420+
"Select the cell below and click run ▶ to compile and execute the code:"
421+
]
422+
},
423+
{
424+
"cell_type": "code",
425+
"execution_count": null,
426+
"id": "b9b270be-9539-4724-aac8-62948a15a478",
427+
"metadata": {},
428+
"outputs": [],
429+
"source": [
430+
"! ./q.sh run_sycl_migrated_optimized.sh"
414431
]
415432
},
416433
{
@@ -443,9 +460,9 @@
443460
],
444461
"metadata": {
445462
"kernelspec": {
446-
"display_name": "Python 3 (Intel® oneAPI 2023.2)",
463+
"display_name": "Python 3 (ipykernel)",
447464
"language": "python",
448-
"name": "c009-intel_distribution_of_python_3_oneapi-beta05-python"
465+
"name": "python3"
449466
},
450467
"language_info": {
451468
"codemirror_mode": {
@@ -457,7 +474,7 @@
457474
"name": "python",
458475
"nbconvert_exporter": "python",
459476
"pygments_lexer": "ipython3",
460-
"version": "3.9.16"
477+
"version": "3.11.5"
461478
}
462479
},
463480
"nbformat": 4,

DirectProgramming/C++SYCL/Jupyter/cuda-to-sycl-migration-training/04_SYCL_Migration_MatrixMul_CuBlas/04_SYCL_Migration_MatrixMul_CuBlas.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
"metadata": {},
224224
"outputs": [],
225225
"source": [
226-
"! ./q.sh run_sycl_migrated.sh gen9"
226+
"! ./q.sh run_sycl_migrated.sh"
227227
]
228228
},
229229
{
@@ -296,9 +296,9 @@
296296
],
297297
"metadata": {
298298
"kernelspec": {
299-
"display_name": "Python 3 (Intel® oneAPI 2023.2)",
299+
"display_name": "Python 3 (ipykernel)",
300300
"language": "python",
301-
"name": "c009-intel_distribution_of_python_3_oneapi-beta05-python"
301+
"name": "python3"
302302
},
303303
"language_info": {
304304
"codemirror_mode": {
@@ -310,7 +310,7 @@
310310
"name": "python",
311311
"nbconvert_exporter": "python",
312312
"pygments_lexer": "ipython3",
313-
"version": "3.9.16"
313+
"version": "3.11.5"
314314
}
315315
},
316316
"nbformat": 4,

DirectProgramming/C++SYCL/Jupyter/gpu-optimization-sycl-training/01_Introduction_to_GPU_Optimization/01_Introduction.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"- Modify the module's example code and then \"Build and Run\", this will generate the binary in `lab/a.out`\n",
7777
"- Then in \"Terminal\", go to the current module directory and run the following vtune command (change the `-result-dir` value from `vtune_data` to something that identifies your code) \n",
7878
"```\n",
79-
"vtune -collect gpu-hotspots -result-dir vtune_data $(pwd)/lab/a.out\n",
79+
"vtune -collect gpu-hotspots -result-dir vtune_data $(pwd)/a.out\n",
8080
"```\n",
8181
"- Compress the vtune results directory to copy to your location computer (GUI)\n",
8282
"```\n",

DirectProgramming/C++SYCL/Jupyter/gpu-optimization-sycl-training/02_Thread_Mapping_and_Occupancy/02_Thread_Mapping_and_Occupancy.ipynb

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,19 @@
469469
"\n",
470470
"You can run this command in terminal, login to a GPU nodeand run the script `source vtune_collect.sh`, collecting vtune data will take few minutes and will generate a html report in the same folder, it will also create a folder `vtune_data` folder, this folder can be zipped up and copied to local machine with VTune GUI tool installed to analyze further like shown below:\n",
471471
"\n",
472+
"#### Analysis using Intel VTune Profiler\n",
473+
"\n",
474+
"Below is vtune command line to capture the `gpu-hotspots` data using a terminal and the resulting captured data can be viewed using Intel VTune Profiler GUI:\n",
475+
"\n",
476+
"- Run script in \"Build and Run\" section above\n",
477+
"- Then in \"Terminal\", go to the current module directory and run the following vtune command (change the `-result-dir` value from `vtune_data` to something that identifies your code) \n",
478+
"```\n",
479+
"vtune -collect gpu-hotspots -result-dir vtune_data $(pwd)/a.out\n",
480+
"```\n",
481+
"- Download the vtune results directory and open using Intel VTune Profiler GUI to do analysis.\n",
482+
"\n",
483+
"Detailed instructions for capturing VTune data and performing analysis is in the \"Introduction to GPU Optimization\" module under the \"Analysis using Intel VTune Profiler\" section.\n",
484+
"\n",
472485
"From the VTune output below you can see that Occupancy we predicted earlier doing the manual calculation and the VTune data are the same:\n",
473486
"\n",
474487
"<img src=\"assets/vtune_tasks_vec_add_gen9.png\">\n",
@@ -493,9 +506,9 @@
493506
],
494507
"metadata": {
495508
"kernelspec": {
496-
"display_name": "Python 3 (Intel® oneAPI 2023.2)",
509+
"display_name": "Python 3 (ipykernel)",
497510
"language": "python",
498-
"name": "c009-intel_distribution_of_python_3_oneapi-beta05-python"
511+
"name": "python3"
499512
},
500513
"language_info": {
501514
"codemirror_mode": {
@@ -507,7 +520,7 @@
507520
"name": "python",
508521
"nbconvert_exporter": "python",
509522
"pygments_lexer": "ipython3",
510-
"version": "3.9.16"
523+
"version": "3.11.5"
511524
}
512525
},
513526
"nbformat": 4,

DirectProgramming/C++SYCL/Jupyter/gpu-optimization-sycl-training/03_Memory_Optimization/031_Memory_Optimization_Buffers.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
"- Modify the code above and then \"Build and Run\" the code in the section above\n",
135135
"- Then in \"Terminal\", go to the current module directory and run the following vtune command (change the `-result-dir` value from `vtune_data` to something that identifies your code) \n",
136136
"```\n",
137-
"vtune -collect gpu-hotspots -result-dir vtune_data $(pwd)/lab/a.out\n",
137+
"vtune -collect gpu-hotspots -result-dir vtune_data $(pwd)/a.out\n",
138138
"```\n",
139139
"- Download the vtune results directory and open using Intel VTune Profiler GUI to do analysis.\n",
140140
"\n",
@@ -770,7 +770,7 @@
770770
"- Modify the code above and then \"Build and Run\" the code in the section above\n",
771771
"- Then in \"Terminal\", go to the current module directory and run the following vtune command (change the `-result-dir` value from `vtune_data` to something that identifies your code) \n",
772772
"```\n",
773-
"vtune -collect gpu-hotspots -result-dir vtune_data $(pwd)/lab/a.out\n",
773+
"vtune -collect gpu-hotspots -result-dir vtune_data $(pwd)/a.out\n",
774774
"```\n",
775775
"- Download the vtune results directory and open using Intel VTune Profiler GUI to do analysis.\n",
776776
"\n",

DirectProgramming/C++SYCL/Jupyter/gpu-optimization-sycl-training/03_Memory_Optimization/032_Memory_Optimization_USM.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
"- Modify the code above and then \"Build and Run\" the code in the section above\n",
148148
"- Then in \"Terminal\", go to the current module directory and run the following vtune command (change the `-result-dir` value from `vtune_data` to something that identifies your code) \n",
149149
"```\n",
150-
"vtune -collect gpu-hotspots -result-dir vtune_data $(pwd)/lab/a.out\n",
150+
"vtune -collect gpu-hotspots -result-dir vtune_data $(pwd)/a.out\n",
151151
"```\n",
152152
"- Download the vtune results directory and open using Intel VTune Profiler GUI to do analysis.\n",
153153
"\n",
@@ -263,7 +263,7 @@
263263
"- Modify the code above and then \"Build and Run\" the code in the section above\n",
264264
"- Then in \"Terminal\", go to the current module directory and run the following vtune command (change the `-result-dir` value from `vtune_data` to something that identifies your code) \n",
265265
"```\n",
266-
"vtune -collect gpu-hotspots -result-dir vtune_data $(pwd)/lab/a.out\n",
266+
"vtune -collect gpu-hotspots -result-dir vtune_data $(pwd)/a.out\n",
267267
"```\n",
268268
"- Download the vtune results directory and open using Intel VTune Profiler GUI to do analysis.\n",
269269
"\n",

0 commit comments

Comments
 (0)