-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f44e0d9
commit b29c388
Showing
6 changed files
with
220 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,36 @@ | ||
using DistanceTransforms | ||
using Test | ||
|
||
using KernelAbstractions | ||
using CUDA, AMDGPU, Metal | ||
# using oneAPI | ||
using Random | ||
|
||
if CUDA.functional() | ||
@info "Using CUDA" | ||
CUDA.versioninfo() | ||
backend = CUDABackend() | ||
dev = CuArray | ||
elseif AMDGPU.functional() | ||
@info "Using AMD" | ||
AMDGPU.versioninfo() | ||
backend = ROCBackend() | ||
dev = ROCArray | ||
# elseif oneAPI.functional() ## not well supported | ||
# @info "Using oneAPI" | ||
# oneAPI.versioninfo() | ||
# backend = oneBackend() | ||
# dev = oneArray | ||
elseif Metal.functional() | ||
@info "Using Metal" | ||
Metal.versioninfo() | ||
backend = MetalBackend() | ||
dev = MtlArray | ||
else | ||
@info "No GPU is available. Using CPU." | ||
backend = CPU() | ||
dev = Array | ||
end | ||
|
||
include("transform.jl") | ||
include("utils.jl") |
Oops, something went wrong.