move tests
This commit is contained in:
parent
f9768a17fb
commit
8e3f70545a
|
@ -1,12 +1,12 @@
|
|||
using Flux, Test
|
||||
using Flux.CuArrays
|
||||
using Flux.CUDA
|
||||
using Flux: gpu
|
||||
|
||||
@info "Testing GPU Support"
|
||||
|
||||
@testset "CuArrays" begin
|
||||
@testset "CUDA" begin
|
||||
|
||||
CuArrays.allowscalar(false)
|
||||
CUDA.allowscalar(false)
|
||||
|
||||
x = randn(5, 5)
|
||||
cx = gpu(x)
|
||||
|
@ -65,7 +65,7 @@ end
|
|||
@test gradient(foo, cu(rand(1)))[1] isa CuArray
|
||||
end
|
||||
|
||||
if CuArrays.has_cudnn()
|
||||
if CUDA.has_cudnn()
|
||||
@info "Testing Flux/CUDNN"
|
||||
include("cudnn.jl")
|
||||
include("curnn.jl")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Flux, CuArrays, Test
|
||||
using Flux, CUDA, Test
|
||||
using Flux: pullback
|
||||
|
||||
@testset "CUDNN BatchNorm" begin
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Flux, CuArrays, Test
|
||||
using Flux, CUDA, Test
|
||||
using Flux: pullback
|
||||
|
||||
@testset for R in [RNN, GRU, LSTM]
|
||||
|
|
|
@ -35,7 +35,7 @@ function gradtest(name::String, layers::Vector, xs = nothing, args...)
|
|||
|
||||
# Handle pooling layers
|
||||
if !isempty(ps)
|
||||
@test gs[first(ps)] isa Flux.CuArrays.CuArray
|
||||
@test gs[first(ps)] isa Flux.CUDA.CuArray
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue