From 956281140ca98f8d1f39dabd552ef3c5e2d3d75c Mon Sep 17 00:00:00 2001 From: CarloLucibello Date: Sun, 20 Oct 2024 10:30:29 +0200 Subject: [PATCH] remove LOADED --- test/ext_amdgpu/basic.jl | 2 -- test/ext_metal/basic.jl | 2 -- test/functors.jl | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/test/ext_amdgpu/basic.jl b/test/ext_amdgpu/basic.jl index 163064c072..8962c7bedb 100644 --- a/test/ext_amdgpu/basic.jl +++ b/test/ext_amdgpu/basic.jl @@ -1,5 +1,3 @@ -@test Flux.AMDGPU_LOADED[] - @testset "Basic GPU movement" begin @test Flux.gpu(rand(Float64, 16)) isa ROCArray{Float32, 1} @test Flux.gpu(rand(Float64, 16, 16)) isa ROCArray{Float32, 2} diff --git a/test/ext_metal/basic.jl b/test/ext_metal/basic.jl index 97ba8066a3..9febd8e455 100644 --- a/test/ext_metal/basic.jl +++ b/test/ext_metal/basic.jl @@ -1,5 +1,3 @@ -@test Flux.METAL_LOADED[] - @testset "Basic GPU movement" begin @test Flux.gpu(rand(Float64, 16)) isa MtlArray{Float32, 1} @test Flux.gpu(rand(Float64, 16, 16)) isa MtlArray{Float32, 2} diff --git a/test/functors.jl b/test/functors.jl index 734eadc574..111da50ea8 100644 --- a/test/functors.jl +++ b/test/functors.jl @@ -1,5 +1,5 @@ x = rand(Float32, 10, 10) -if !(Flux.CUDA_LOADED[] || Flux.AMDGPU_LOADED[] || Flux.METAL_LOADED[]) +if gpu_device() isa CPUDevice @test x === gpu(x) end