Skip to content

Commit cc3c761

Browse files
committed
fix cuda test error
1 parent 2bd914d commit cc3c761

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/ext/CUDA/cuda.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ using Bijectors, CUDA, Distributions, Flux, LinearAlgebra, Test
2929
return (transformed=transformed, wT_û=wT_û, wT_z=wT_z)
3030
end
3131

32+
CUDA.allowscalar(true)
3233
dists = [
3334
MvNormal(CUDA.zeros(2), cu(Matrix{Float64}(I, 2, 2))),
3435
MvNormal(CUDA.zeros(2), cu([1.0 0.5; 0.5 1.0])),
3536
]
3637

3738
@testset "$dist" for dist in dists
38-
CUDA.allowscalar(true)
3939
x = NormalizingFlows._device_specific_rand(CUDA.default_rng(), dist)
4040
xs = NormalizingFlows._device_specific_rand(CUDA.default_rng(), dist, 100)
4141
@test_nowarn logpdf(dist, x)
@@ -44,7 +44,6 @@ using Bijectors, CUDA, Distributions, Flux, LinearAlgebra, Test
4444
end
4545

4646
@testset "$dist" for dist in dists
47-
CUDA.allowscalar(true)
4847
pl1 = PlanarLayer(
4948
identity(CUDA.rand(2)), identity(CUDA.rand(2)), identity(CUDA.rand(1))
5049
)

0 commit comments

Comments
 (0)