Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Nov 6, 2024
1 parent 36c25e0 commit 71123bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/MLDataDevices/ext/MLDataDevicesChainRulesExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ for Dev in (CUDADevice, AMDGPUDevice, MetalDevice, ReactantDevice)
@eval Adapt.adapt_storage(to::$Dev, x::OneElement) = Adapt.adapt(to, collect(x))
end

end
end
4 changes: 2 additions & 2 deletions lib/MLDataDevices/test/misc_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ end
end

@testset "Zygote and ChainRules OneElement" begin
# Issue #91
# Issue #1016
using Zygote
cpu = cpu_device()
gpu = gpu_device()
Expand All @@ -230,4 +230,4 @@ end
@test g isa Vector{Float32}
g = Zygote.gradient(x -> cpu(gpu(x) * gpu(x))[1,2], Float32[1 2 3; 4 5 6; 7 8 9])[1]
@test g isa Matrix{Float32}
end
end

0 comments on commit 71123bd

Please sign in to comment.