Skip to content

Commit 4d935a5

Browse files
committed
Add some docs for CUDAKernels/ROCKernels
1 parent 8c9d7b4 commit 4d935a5

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

docs/src/index.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,30 @@ all(A .== 2.0)
5050
argument to the kernel. See [dependencies](@ref dependencies) for a full
5151
explanation.
5252

53+
If you have a GPU attached to your machine, it's equally as easy to launch your
54+
kernel on it instead. For example, launching on a CUDA GPU:
55+
56+
```julia
57+
using CUDAKernels # Required to access CUDADevice
58+
A = CUDA.ones(1024, 1024)
59+
kernel = mul2(CUDADevice(), 16)
60+
# ... the rest is the same!
61+
```
62+
63+
AMDGPU (ROCm) support is also available via the ROCKernels.jl package, although
64+
at this time it is considered experimental. Ping `@jpsamaroo` in any issues
65+
specific to the ROCKernels backend.
66+
5367
## Important differences to Julia
5468

5569
1. Functions inside kernels are forcefully inlined, except when marked with `@noinline`.
5670
2. Floating-point multiplication, addition, subtraction are marked contractable.
5771

58-
## Important differences to CUDA.jl
72+
## Important differences to CUDA.jl/AMDGPU.jl
5973

6074
1. The kernels are automatically bounds-checked against either the dynamic or statically
6175
provided `ndrange`.
62-
2. Functions like `Base.sin` are mapped to `CUDA.sin`.
76+
2. Functions like `Base.sin` are mapped to `CUDA.sin`/`AMDGPU.sin`.
6377

6478
## Important differences to GPUifyLoops.jl
6579

0 commit comments

Comments
 (0)