Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@ using ImageCore.OffsetArrays
using CenterIndexedArrays, RegisterCore, RegisterMismatchCommon
using Test, Libdl

havecuda = isdefined(Main, :use_cuda) ? Main.use_cuda : !isempty(find_library(["libcudart", "cudart"], ["/usr/local/cuda"]))
if havecuda
println("Running both CPU and CUDA versions")
using CUDAdrv
import RegisterMismatchCuda
RMlist = (RegisterMismatch, RegisterMismatchCuda)
devlist = devices() # dev->capability(dev)[1] >= 2, nmax=1)
else
RMlist = (RegisterMismatch,)
let
_want_cuda = isdefined(Main, :use_cuda) ? Main.use_cuda : !isempty(find_library(["libcudart", "cudart"], ["/usr/local/cuda"]))
_loaded = false
if _want_cuda
try
@eval using CUDAdrv
@eval import RegisterMismatchCuda
global devlist = @eval devices()
global RMlist = (RegisterMismatch, @eval(RegisterMismatchCuda))
_loaded = true
println("Running both CPU and CUDA versions")
catch
end
end
if !_loaded
global RMlist = (RegisterMismatch,)
end
end
accuracy = 1e-5 # new isapprox accuracy = 1e-6

Expand Down
Loading