Skip to content

Commit 09ce74c

Browse files
committed
merge
2 parents b0754fe + bf85572 commit 09ce74c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Supports **CUDA**, **AMDGPU**, **Metal** (Apple Silicon), **oneAPI** (Intel), an
1111
> Libraries should accept a backend as a parameter and let the caller decide, using
1212
> [KernelAbstractions.jl](https://github.com/JuliaGPU/KernelAbstractions.jl) or
1313
> [GPUArrays.jl](https://github.com/JuliaGPU/GPUArrays.jl) abstractions directly.
14-
> GPUSelect can be appropriate for library *defaults* though:
14+
> GPUSelect *could* be appropriate for library defaults though, but still needs some more discussion if that's a good idea:
1515
>
1616
> ```julia
1717
> function my_kernel_runner(data; backend = GPUSelect.Backend())
@@ -31,10 +31,12 @@ GPUSelect.auto_install!() # e.g. installs AMDGPU on an AMD machine
3131
3232
# 3. In every script
3333
using GPUSelect
34+
# These directly return the types from the backend
3435
backend = GPUSelect.Backend() # ROCBackend() / CUDABackend() / CPU() / …
3536
AT = GPUSelect.Storage() # ROCArray / CuArray / Array / …
3637
3738
x = AT{Float32}(undef, 1024) # allocate on the right device
39+
y = adapt(backend, rand(4, 4)) # backend/storage work with adapt
3840
```
3941
4042
## API
@@ -62,7 +64,7 @@ Both `Backend` and `Storage` accept:
6264

6365
- `fallback=true`: silently return `CPU()` / `Array` and emit a warning when the backend is unavailable (default: `true`).
6466
- `fallback=false`: error instead of falling back.
65-
- `install=true`: call `auto_install!()` automatically if no backend is found.
67+
- `install=true`: **EXPERIMENTAL**, call `auto_install!()` automatically if no backend is found. Still needs some investigation if this is a good idea!
6668

6769
> **`Backend()` / `Storage()` do not auto-install by default.** The `install` keyword
6870
> defaults to `get_install_preference()`, which is `false` unless you opt in once with

0 commit comments

Comments
 (0)