|
20 | 20 | shape = (10000,)
|
21 | 21 | seed1 = Reactant.to_rarray(UInt64[1, 4])
|
22 | 22 | 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) |
27 | 27 |
|
28 | 28 | model_compiled = @compile optimize = :probprog generate_model(seed1, μ1, σ1, shape)
|
29 | 29 |
|
|
41 | 41 | @testset "normal_hlo" begin
|
42 | 42 | shape = (10000,)
|
43 | 43 | 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) |
46 | 46 |
|
47 | 47 | before = @code_hlo optimize = :no_enzyme generate_model(seed, μ, σ, shape)
|
48 | 48 | @test contains(repr(before), "enzyme.generate")
|
|
56 | 56 | @testset "normal_generate" begin
|
57 | 57 | shape = (10000,)
|
58 | 58 | 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) |
61 | 61 | X = Array(@jit optimize = :probprog generate_model(seed, μ, σ, shape))
|
62 | 62 | @test mean(X) ≈ 0.0 atol = 0.05 rtol = 0.05
|
63 | 63 | end
|
|
0 commit comments