Skip to content

Commit 1dbf5c7

Browse files
committed
fix test warning
1 parent e53fc7c commit 1dbf5c7

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

test/probprog/generate.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ end
2020
shape = (10000,)
2121
seed1 = Reactant.to_rarray(UInt64[1, 4])
2222
seed2 = Reactant.to_rarray(UInt64[1, 4])
23-
μ1 = Reactant.ConcreteRArray(0.0)
24-
μ2 = Reactant.ConcreteRArray(1000.0)
25-
σ1 = Reactant.ConcreteRArray(1.0)
26-
σ2 = Reactant.ConcreteRArray(1.0)
23+
μ1 = Reactant.ConcreteRNumber(0.0)
24+
μ2 = Reactant.ConcreteRNumber(1000.0)
25+
σ1 = Reactant.ConcreteRNumber(1.0)
26+
σ2 = Reactant.ConcreteRNumber(1.0)
2727

2828
model_compiled = @compile optimize = :probprog generate_model(seed1, μ1, σ1, shape)
2929

@@ -41,8 +41,8 @@ end
4141
@testset "normal_hlo" begin
4242
shape = (10000,)
4343
seed = Reactant.to_rarray(UInt64[1, 4])
44-
μ = Reactant.ConcreteRArray(0.0)
45-
σ = Reactant.ConcreteRArray(1.0)
44+
μ = Reactant.ConcreteRNumber(0.0)
45+
σ = Reactant.ConcreteRNumber(1.0)
4646

4747
before = @code_hlo optimize = :no_enzyme generate_model(seed, μ, σ, shape)
4848
@test contains(repr(before), "enzyme.generate")
@@ -56,8 +56,8 @@ end
5656
@testset "normal_generate" begin
5757
shape = (10000,)
5858
seed = Reactant.to_rarray(UInt64[1, 4])
59-
μ = Reactant.ConcreteRArray(0.0)
60-
σ = Reactant.ConcreteRArray(1.0)
59+
μ = Reactant.ConcreteRNumber(0.0)
60+
σ = Reactant.ConcreteRNumber(1.0)
6161
X = Array(@jit optimize = :probprog generate_model(seed, μ, σ, shape))
6262
@test mean(X) 0.0 atol = 0.05 rtol = 0.05
6363
end

test/probprog/sample.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ end
3030
@testset "sample_hlo" begin
3131
shape = (10,)
3232
seed = Reactant.to_rarray(UInt64[1, 4])
33-
μ = Reactant.ConcreteRArray(0.0)
34-
σ = Reactant.ConcreteRArray(1.0)
33+
μ = Reactant.ConcreteRNumber(0.0)
34+
σ = Reactant.ConcreteRNumber(1.0)
3535
before = @code_hlo optimize = false sample2(seed, μ, σ, shape)
3636
@test contains(repr(before), "enzyme.sample")
3737
after = @code_hlo optimize = :probprog sample2(seed, μ, σ, shape)
@@ -41,8 +41,8 @@ end
4141
@testset "sample_normal" begin
4242
shape = (10,)
4343
seed = Reactant.to_rarray(UInt64[1, 4])
44-
μ = Reactant.ConcreteRArray(0.0)
45-
σ = Reactant.ConcreteRArray(1.0)
44+
μ = Reactant.ConcreteRNumber(0.0)
45+
σ = Reactant.ConcreteRNumber(1.0)
4646
X = Array(@jit optimize = :probprog sample1(seed, μ, σ, shape))
4747
Y = Array(@jit optimize = :probprog sample2(seed, μ, σ, shape))
4848
@test !all(X .≈ Y)

0 commit comments

Comments
 (0)