Skip to content

Commit dbbe823

Browse files
authored
Merge pull request #1804 from krisrak/20230724-genhelper
updated c2s cmd line option --gen-helper-function
2 parents dcbbd11 + 5a43887 commit dbbe823

File tree

5 files changed

+29
-26
lines changed

5 files changed

+29
-26
lines changed

DirectProgramming/C++SYCL/Jupyter/cuda-to-sycl-migration-training/00_SYCL_Migration_Introduction/00_SYCL_Migration_Introduction.ipynb

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
" - In home directory or anywhere: `mkdir syclomatic; cd syclomatic`\n",
159159
" - `wget <link to linux_release.tgz>`\n",
160160
" - `tar –xvf linux_release.tgz`\n",
161-
" - `export PATH=/home/$USER/syclomatic/bin:$PATH`\n",
161+
" - `export PATH=\"/home/$USER/syclomatic/bin:$PATH\"`\n",
162162
" - `c2s --version`\n",
163163
" \n",
164164
"### SYCLomatic tool usage\n",
@@ -168,7 +168,7 @@
168168
"- Migrate a single CUDA source file:\n",
169169
" - `c2s test.cu`\n",
170170
"- Migrate a single CUDA source file and copy all syclomatic helper header files:\n",
171-
" - `c2s test.cu --use-custom-helper=all/file/api`\n",
171+
" - `c2s test.cu --gen-helper-function`\n",
172172
"- Migrate a single CUDA source to a specific directory name\n",
173173
" - `c2s test.cu --out-root sycl_code`\n",
174174
"- Migrate a single CUDA source with source root tree\n",
@@ -177,23 +177,26 @@
177177
" - `c2s test.cu --cuda-include-path /tmp/cuda/include`\n",
178178
"- Migrate a CUDA project with makefile:\n",
179179
" - `intercept-build make`\n",
180-
" - `c2s -p compile_command.json`\n",
180+
" - `c2s -p compile_command.json` OR `c2s -p .`\n",
181+
"- Migrate a CUDA project with makefile and generate makefile for building SYCL:\n",
182+
" - `intercept-build make`\n",
183+
" - `c2s -p . --gen-build-script`\n",
181184
"\n",
182185
"\n",
183186
"### Compiling SYCL on Intel and Other hardware\n",
184187
"\n",
185188
"- Install __Intel oneAPI C++/DPC++ Compiler__ or __Intel oneAPI Base Toolkit__\n",
186189
"- Install CUDA Plugin for oneAPI from CodePlay \n",
187-
"- Link to [Installation Instructions](https://developer.codeplay.com/products/oneapi/nvidia/2023.0.0/guides/get-started-guide-nvidia)\n",
190+
"- Link to [Installation Instructions](https://developer.codeplay.com/products/oneapi/nvidia/)\n",
188191
"\n",
189192
"- Set environment variable for using the Compiler\n",
190-
" - `source /opt/intel/oneapi/setvars.sh --include-intel-llvm`\n",
193+
" - `source /opt/intel/oneapi/setvars.sh`\n",
191194
"\n",
192195
"- Compile SYCL for Intel CPUs/GPUs\n",
193196
" - `icpx –fsycl test.cpp`\n",
194197
"\n",
195198
"- Compile SYCL for Nvidia* GPUs\n",
196-
" - `clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda test.cpp`\n",
199+
" - `icpx -fsycl -fsycl-targets=nvptx64-nvidia-cuda test.cpp`\n",
197200
"\n",
198201
"### Program Structure of Migrated SYCL code\n",
199202
"\n",
@@ -259,7 +262,7 @@
259262
],
260263
"metadata": {
261264
"kernelspec": {
262-
"display_name": "Python 3 (Intel® oneAPI 2023.0)",
265+
"display_name": "Python 3 (Intel® oneAPI 2023.2)",
263266
"language": "python",
264267
"name": "c009-intel_distribution_of_python_3_oneapi-beta05-python"
265268
},
@@ -273,7 +276,7 @@
273276
"name": "python",
274277
"nbconvert_exporter": "python",
275278
"pygments_lexer": "ipython3",
276-
"version": "3.9.15"
279+
"version": "3.9.16"
277280
}
278281
},
279282
"nbformat": 4,

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,19 +155,19 @@
155155
"On the NVIDIA CUDA development machine, run the following command to migrate CUDA code to SYCL code:\n",
156156
"\n",
157157
"```\n",
158-
"c2s vectoradd.cu --use-custom-helper=api\n",
158+
"c2s vectoradd.cu --gen-helper-function\n",
159159
"```\n",
160160
"\n",
161161
"This command should migrate the CUDA source to SYCL source in a folder named `dpct_output/` by default, and the folder will have the SYCL source with name `vectoradd.dp.cpp`\n",
162162
"\n",
163-
"`--use-custom-helper=api` option will copy the SYCLomatic helper headers filed to output directory\n",
163+
"`--gen-helper-function` option will copy the SYCLomatic helper headers filed to output directory\n",
164164
"\n",
165-
"Note that when running the tool again for the same source may throw error that `dpct_output` folder is not empty, so make sure to delete the `dpct_output` folder and then try the `c2s vectoradd.cu --use-custom-helper=api` command.\n",
165+
"Note that when running the tool again for the same source may throw error that `dpct_output` folder is not empty, so make sure to delete the `dpct_output` folder and then try the `c2s vectoradd.cu --gen-helper-function` command.\n",
166166
"\n",
167167
"Next we will use the `c2s --out-root` option to specify a custom output directory like shown below:\n",
168168
"\n",
169169
"```\n",
170-
"c2s vectoradd.cu --use-custom-helper=api --out-root sycl_code\n",
170+
"c2s vectoradd.cu --gen-helper-function --out-root sycl_code\n",
171171
"```\n",
172172
"\n",
173173
"This command should migrate the CUDA source to SYCL source in a folder named `sycl_code`\n",
@@ -474,7 +474,7 @@
474474
],
475475
"metadata": {
476476
"kernelspec": {
477-
"display_name": "Python 3 (Intel® oneAPI 2023.0)",
477+
"display_name": "Python 3 (Intel® oneAPI 2023.2)",
478478
"language": "python",
479479
"name": "c009-intel_distribution_of_python_3_oneapi-beta05-python"
480480
},
@@ -488,7 +488,7 @@
488488
"name": "python",
489489
"nbconvert_exporter": "python",
490490
"pygments_lexer": "ipython3",
491-
"version": "3.9.15"
491+
"version": "3.9.16"
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
@@ -147,10 +147,10 @@
147147
"Next, use the SYCLomatic Tool (c2s) to migrate the code; it will store the result in the migration folder `dpct_output`:\n",
148148
"\n",
149149
"```\n",
150-
"c2s -p compile_commands.json --in-root ../../.. --use-custom-helper=api\n",
150+
"c2s -p compile_commands.json --in-root ../../.. --gen-helper-function\n",
151151
"```\n",
152152
"\n",
153-
"The `--use-custom-helper=api` option will copy the SYCLomatic helper header files to output directory.\n",
153+
"The `--gen-helper-function` option will copy the SYCLomatic helper header files to output directory.\n",
154154
"\n",
155155
"The `--in-root` option will specify the path for all the common include files for the CUDA project.\n",
156156
"\n",
@@ -335,7 +335,7 @@
335335
],
336336
"metadata": {
337337
"kernelspec": {
338-
"display_name": "Python 3 (Intel® oneAPI 2023.0)",
338+
"display_name": "Python 3 (Intel® oneAPI 2023.2)",
339339
"language": "python",
340340
"name": "c009-intel_distribution_of_python_3_oneapi-beta05-python"
341341
},
@@ -349,7 +349,7 @@
349349
"name": "python",
350350
"nbconvert_exporter": "python",
351351
"pygments_lexer": "ipython3",
352-
"version": "3.9.15"
352+
"version": "3.9.16"
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,12 @@
148148
"Next, use the SYCLomatic Tool (c2s) to migrate the code; it will store the result in the migration folder `dpct_output`:\n",
149149
"\n",
150150
"```\n",
151-
"c2s -p compile_commands.json --in-root ../../.. --use-custom-helper=api --use-experimental-features=logical-group\n",
151+
"c2s -p compile_commands.json --in-root ../../.. --gen-helper-function --use-experimental-features=logical-group\n",
152152
"```\n",
153153
"\n",
154154
"`-use-experimental-features=logical-group` option is needed since this CUDA example is using CUDA cooperative groups, and SYCLomatic will migrate this using a experimemtal feature currently.\n",
155155
"\n",
156-
"The `--use-custom-helper=api` option will copy the SYCLomatic helper header files to output directory.\n",
156+
"The `--gen-helper-function` option will copy the SYCLomatic helper header files to output directory.\n",
157157
"\n",
158158
"The `--in-root` option will specify the path for all the common include files for the CUDA project.\n",
159159
"\n",
@@ -443,7 +443,7 @@
443443
],
444444
"metadata": {
445445
"kernelspec": {
446-
"display_name": "Python 3 (Intel® oneAPI 2023.0)",
446+
"display_name": "Python 3 (Intel® oneAPI 2023.2)",
447447
"language": "python",
448448
"name": "c009-intel_distribution_of_python_3_oneapi-beta05-python"
449449
},
@@ -457,7 +457,7 @@
457457
"name": "python",
458458
"nbconvert_exporter": "python",
459459
"pygments_lexer": "ipython3",
460-
"version": "3.9.15"
460+
"version": "3.9.16"
461461
}
462462
},
463463
"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
@@ -133,10 +133,10 @@
133133
"Next, use the SYCLomatic Tool (c2s) to migrate the code; it will store the result in the migration folder `dpct_output`:\n",
134134
"\n",
135135
"```\n",
136-
"c2s -p compile_commands.json --in-root ../../.. --use-custom-helper=api\n",
136+
"c2s -p compile_commands.json --in-root ../../.. --gen-helper-function\n",
137137
"```\n",
138138
"\n",
139-
"The `--use-custom-helper=api` option will copy the SYCLomatic helper header files to output directory.\n",
139+
"The `--gen-helper-function` option will copy the SYCLomatic helper header files to output directory.\n",
140140
"\n",
141141
"The `--in-root` option will specify the path for all the common include files for the CUDA project.\n",
142142
"\n",
@@ -296,7 +296,7 @@
296296
],
297297
"metadata": {
298298
"kernelspec": {
299-
"display_name": "Python 3 (Intel® oneAPI 2023.0)",
299+
"display_name": "Python 3 (Intel® oneAPI 2023.2)",
300300
"language": "python",
301301
"name": "c009-intel_distribution_of_python_3_oneapi-beta05-python"
302302
},
@@ -310,7 +310,7 @@
310310
"name": "python",
311311
"nbconvert_exporter": "python",
312312
"pygments_lexer": "ipython3",
313-
"version": "3.9.15"
313+
"version": "3.9.16"
314314
}
315315
},
316316
"nbformat": 4,

0 commit comments

Comments
 (0)