Skip to content

Commit 4e5d276

Browse files
authored
[SYCL][doc] Add mention of cuda gpu arch for enabling cuda-arch specific features (#6978)
Some users were mistakenly thinking that native atomics are not supported in DPC++ for CUDA. The doc now mentions that you need to provide correct arch flags when compiling if you wish to use native atomics as well as other features.
1 parent 28d0cd3 commit 4e5d276

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sycl/doc/GetStartedGuide.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,17 @@ clang++ -fsycl -fsycl-targets=amdgcn-amd-amdhsa \
641641
simple-sycl-app.cpp -o simple-sycl-app-amd.exe
642642
```
643643
644+
The target architecture may also be specified for the CUDA backend, with
645+
`-Xsycl-target-backend --cuda-gpu-arch=<arch>`. Specifying the architecture is
646+
necessary if an application aims to use newer hardware features, such as
647+
native atomic operations or tensor core operations.
648+
649+
```bash
650+
clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda \
651+
simple-sycl-app.cpp -o simple-sycl-app-cuda.exe \
652+
-Xsycl-target-backend --cuda-gpu-arch=sm_80
653+
```
654+
644655
To build simple-sycl-app ahead of time for GPU, CPU or Accelerator devices,
645656
specify the target architecture. The examples provided use a supported
646657
alias for the target, representing a full triple. Additional details can

0 commit comments

Comments
 (0)