move tests

This commit is contained in:
Dhairya Gandhi 2020-06-01 22:06:58 +05:30
parent f9768a17fb
commit 8e3f70545a
4 changed files with 7 additions and 7 deletions

View File

@ -1,12 +1,12 @@
using Flux, Test using Flux, Test
using Flux.CuArrays using Flux.CUDA
using Flux: gpu using Flux: gpu
@info "Testing GPU Support" @info "Testing GPU Support"
@testset "CuArrays" begin @testset "CUDA" begin
CuArrays.allowscalar(false) CUDA.allowscalar(false)
x = randn(5, 5) x = randn(5, 5)
cx = gpu(x) cx = gpu(x)
@ -65,7 +65,7 @@ end
@test gradient(foo, cu(rand(1)))[1] isa CuArray @test gradient(foo, cu(rand(1)))[1] isa CuArray
end end
if CuArrays.has_cudnn() if CUDA.has_cudnn()
@info "Testing Flux/CUDNN" @info "Testing Flux/CUDNN"
include("cudnn.jl") include("cudnn.jl")
include("curnn.jl") include("curnn.jl")

View File

@ -1,4 +1,4 @@
using Flux, CuArrays, Test using Flux, CUDA, Test
using Flux: pullback using Flux: pullback
@testset "CUDNN BatchNorm" begin @testset "CUDNN BatchNorm" begin

View File

@ -1,4 +1,4 @@
using Flux, CuArrays, Test using Flux, CUDA, Test
using Flux: pullback using Flux: pullback
@testset for R in [RNN, GRU, LSTM] @testset for R in [RNN, GRU, LSTM]

View File

@ -35,7 +35,7 @@ function gradtest(name::String, layers::Vector, xs = nothing, args...)
# Handle pooling layers # Handle pooling layers
if !isempty(ps) if !isempty(ps)
@test gs[first(ps)] isa Flux.CuArrays.CuArray @test gs[first(ps)] isa Flux.CUDA.CuArray
end end
end end
end end