Skip to content

updated Jupyter notebooks for C2S based on DX testing #1511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,10 @@
" - copy link to latest `linux_release.tgz` from assets\n",
" - on the CUDA development machine: `mkdir syclomatic; cd syclomatic`\n",
" - `wget <link to linux_release.tgz>`\n",
" - `tar -cvf linux_release.tgz`\n",
" - `export PATH=\"/home/$USER/syclomatic/bin:$PATH\"`\n",
"- Copy the above `vectoradd.cu` CUDA source to this machine\n",
"- Compile and run the `vectoradd.cu`\n",
" - nvcc vectoradd.cu\n",
" - `tar -xvf linux_release.tgz`\n",
" - `export PATH=\"/home/$USER/syclomatic/bin:$PATH\"`\n",
" - Verify installation: `c2s --version`\n",
"- Create a working directory and copy the above `vectoradd.cu` CUDA source to this machine\n",
"\n",
"\n",
"### Migrate CUDA source to SYCL source using SYCLomatic\n",
Expand All @@ -168,7 +167,7 @@
"Next we will use the `c2s --out-root` option to specify a custom output directory like shown below:\n",
"\n",
"```\n",
"c2s --out-root sycl_code vectoradd.cu\n",
"c2s vectoradd.cu --use-custom-helper=api --out-root sycl_code\n",
"```\n",
"\n",
"This command should migrate the CUDA source to SYCL source in a folder named `sycl_code`\n",
Expand Down Expand Up @@ -249,7 +248,14 @@
" sycl::free(d_C, q_ct1);\n",
" return 0;\n",
"}\n",
"```"
"```\n",
"\n",
"The migrated SYCL code can be compiled using the following command in terminal:\n",
"```sh\n",
"icpx -fsycl -I include vectoradd.dp.cpp\n",
"```\n",
"\n",
"OR you can compile and run by executing the cell below:"
]
},
{
Expand Down Expand Up @@ -323,7 +329,7 @@
"source": [
"## Manually Optimize the migrated SYCL source\n",
"\n",
"The SYCLomaticy Tool will migrate the CUDA code to the SYCL code to get functionality, but you may have to manually optimize the resulting SYCL code for optimal performance.\n",
"The SYCLomatic Tool will migrate the CUDA code to the SYCL code to get functionality, but you may have to manually optimize the resulting SYCL code for optimal performance.\n",
"\n",
"Now that we have successfully migrated the CUDA code to the SYCL code and executed on an Intel CPU/GPU, let’s look at what manual optimizations we can do.\n",
"\n",
Expand All @@ -339,7 +345,7 @@
"The above code is also creating a SYCL queue with an `in_order` queue property and is doing a default device selection, which is the same as the code below using just SYCL api syntax:\n",
"\n",
"```cpp\n",
"sycl::queue q_ct1{sycl::default_selector(), sycl::property::queue::in_order()};\n",
"sycl::queue q_ct1{sycl::default_selector_v(), sycl::property::queue::in_order()};\n",
"```\n",
"\n",
"Using an `in_order` queue property will not allow kernels with no dependency to overlap execution. Therefore, we will remove the `in_order` queue property and add event-based dependency between kernels.\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@
" - copy link to latest `linux_release.tgz` from assets\n",
" - on the CUDA development machine: `mkdir syclomatic; cd syclomatic`\n",
" - `wget <link to linux_release.tgz>`\n",
" - `tar -cvf linux_release.tgz`\n",
" - `export PATH=\"/home/$USER/syclomatic/bin:$PATH\"`\n",
" - `tar -xvf linux_release.tgz`\n",
" - `export PATH=\"/home/$USER/syclomatic/bin:$PATH\"`\n",
" - Verify installation: `c2s --version`\n",
"- pull the CUDA samples repo to this machine\n",
" - `git clone https://github.com/NVIDIA/cuda-samples.git`\n",
"- Compile and run the `sortingNetworks` sample\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@
" - copy link to latest `linux_release.tgz` from assets\n",
" - on the CUDA development machine: `mkdir syclomatic; cd syclomatic`\n",
" - `wget <link to linux_release.tgz>`\n",
" - `tar -cvf linux_release.tgz`\n",
" - `export PATH=\"/home/$USER/syclomatic/bin:$PATH\"`\n",
" - `tar -xvf linux_release.tgz`\n",
" - `export PATH=\"/home/$USER/syclomatic/bin:$PATH\"`\n",
" - Verify installation: `c2s --version`\n",
"- pull the CUDA samples repo to this machine\n",
" - `git clone https://github.com/NVIDIA/cuda-samples.git`\n",
"- Compile and run the `jacobiCudaGraphs` sample\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@
" - copy link to latest `linux_release.tgz` from assets\n",
" - on the CUDA development machine: `mkdir syclomatic; cd syclomatic`\n",
" - `wget <link to linux_release.tgz>`\n",
" - `tar -cvf linux_release.tgz`\n",
" - `export PATH=\"/home/$USER/syclomatic/bin:$PATH\"`\n",
" - `tar -xvf linux_release.tgz`\n",
" - `export PATH=\"/home/$USER/syclomatic/bin:$PATH\"`\n",
" - Verify installation: `c2s --version`\n",
"- pull the CUDA samples repo to this machine\n",
" - `git clone https://github.com/NVIDIA/cuda-samples.git`\n",
"- Compile and run the `matrixMulCUBLAS` sample\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -955,4 +955,4 @@ void Database::PrintQ12(std::string& SM1, std::string& SM2,
// Restore the output format of cout
std::cout.copyfmt(oldState);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ flowchart LR
tier2("Tier 2: Explore the Fundamentals")
tier3("Tier 3: Explore the Advanced Techniques")
tier4("Tier 4: Explore the Reference Designs")

tier1 --> tier2 --> tier3 --> tier4

style tier1 fill:#0071c1,stroke:#0071c1,stroke-width:1px,color:#fff
style tier2 fill:#0071c1,stroke:#0071c1,stroke-width:1px,color:#fff
style tier3 fill:#f96,stroke:#333,stroke-width:1px,color:#fff
Expand Down Expand Up @@ -424,4 +424,4 @@ PASSED
Code samples are licensed under the MIT license. See
[License.txt](https://github.com/oneapi-src/oneAPI-samples/blob/master/License.txt) for details.

Third party program Licenses can be found here: [third-party-programs.txt](https://github.com/oneapi-src/oneAPI-samples/blob/master/third-party-programs.txt).
Third party program Licenses can be found here: [third-party-programs.txt](https://github.com/oneapi-src/oneAPI-samples/blob/master/third-party-programs.txt).
21 changes: 21 additions & 0 deletions third-party-programs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,27 @@ zlib License
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

--------------------------------------------------------------------------------
11. Google API

The Google APIs provide fall back support for fonts used in the oneAPI
Samples Catalog. The specific fall back fonts used are:
Open+Sans&family and Roboto.

1. The Google APIs Terms of Service are found at:
https://developers.google.com/terms

1a. The website cited above was accessed on 29 March 2023.

1b. These Google API endpoints are used for the above-cited fonts,
whose base urls are:
- https://fonts.googleapis.com
- https://fonts.gstatic.com
- https://fonts.googleapis.com

2. The Google Fonts API Terms of Service are found at:
"https://developers.google.com/fonts/terms"

--------------------------------------------------------------------------------
The following third party programs have their own third party program files as well. These additional third party program files are as follows:

Expand Down