You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/index.md
+55-9Lines changed: 55 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,30 @@
1
1
# GPUArrays Documentation
2
2
3
+
GPUArrays is an abstract interface for GPU computations.
4
+
Think of it as the AbstractArray interface in Julia Base but for GPUs.
5
+
It allows you to write generic julia code for all GPU platforms and implements common algorithms for the GPU.
6
+
Like Julia Base, this includes BLAS wrapper, FFTs, maps, broadcasts and mapreduces.
7
+
So when you inherit from GPUArrays and overload the interface correctly, you will get a lot
8
+
of functionality for free.
9
+
This will allow to have multiple GPUArray implementation for different purposes, while
10
+
maximizing the ability to share code.
11
+
Currently there are two packages implementing the interface namely [CLArrays](https://github.com/JuliaGPU/CLArrays.jl) and [CuArrays](https://github.com/JuliaGPU/CuArrays.jl).
12
+
As the name suggests, the first implements the interface using OpenCL and the latter uses CUDA.
3
13
4
-
# Abstract GPU interface
5
14
6
-
GPUArrays supports different platforms like CUDA and OpenCL, which all have different
7
-
names for function that offer the same functionality on the hardware.
8
-
E.g. how to call a function on the GPU, how to get the thread index etc.
9
-
GPUArrays offers an abstract interface for these functions which are overloaded
10
-
by the packages like [CLArrays](https://github.com/JuliaGPU/CLArrays.jl) and [CuArrays](https://github.com/JuliaGPU/CuArrays.jl).
15
+
16
+
# The Abstract GPU interface
17
+
18
+
Different GPU computation frameworks like CUDA and OpenCL, have different
19
+
names for accessing the same hardware functionality.
20
+
E.g. how to launch a GPU Kernel, how to get the thread index and so forth.
21
+
GPUArrays offers a unified abstract interface for these functions.
11
22
This makes it possible to write generic code that can be run on all hardware.
12
-
GPUArrays itself even contains a pure Julia implementation of this interface.
13
-
The julia reference implementation is also a great way to debug your GPU code, since it
14
-
offers many more errors and debugging information compared to the GPU backends - which
23
+
GPUArrays itself even contains a pure [Julia implementation](https://github.com/JuliaGPU/GPUArrays.jl/blob/master/src/jlbackend.jl) of this interface.
24
+
The julia reference implementation is a great way to debug your GPU code, since it
25
+
offers more informative errors and debugging information compared to the GPU backends - which
15
26
mostly silently error or give cryptic errors (so far).
27
+
16
28
You can use the reference implementation by using the `GPUArrays.JLArray` type.
17
29
18
30
The functions that are currently part of the interface:
0 commit comments