diff --git a/test/test-activation.jl b/test/test-activation.jl index 9005dc8..3efd5ae 100644 --- a/test/test-activation.jl +++ b/test/test-activation.jl @@ -24,7 +24,9 @@ cutoff = 0.1 down_factor = 6 ds = create_CNOdownsampler(T, D, N0, down_factor, cutoff, force_cpu = true) u = ds(u0) -ugpu = CuArray(u) +if !CUDA.functional() + ugpu = CuArray(u) +end N = size(u, 1) # Define some activation layers # (1) Identity activation diff --git a/test/test-training.jl b/test/test-training.jl index 3232797..9dae282 100644 --- a/test/test-training.jl +++ b/test/test-training.jl @@ -29,7 +29,9 @@ down_factor0 = 8 cutoff = 0.1 ds = create_CNOdownsampler(T, D, N0, down_factor0, cutoff, force_cpu = true) u = ds(u0) -ug = CuArray(u) +if !CUDA.functional() + ug = CuArray(u) +end N = size(u)[1] # Model configuration ch_ = [2] diff --git a/test/test-updown.jl b/test/test-updown.jl index 3ad9acd..05034c5 100644 --- a/test/test-updown.jl +++ b/test/test-updown.jl @@ -21,7 +21,9 @@ T = Float32 D = 2 u0 = zeros(T, N0, N0, D, 1) u0[:, :, 1, 1] .= testimage("cameraman") -gu0 = CuArray(u0) +if !CUDA.functional() + gu0 = CuArray(u0) +end cutoff = 0.1 # first scale down to work with smaller images down_factor0 = 8