Skip to content

Commit 23c63ba

Browse files
committed
Add smoke tests.
1 parent ecf11d6 commit 23c63ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/static_ir/static_ir.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ z = add_julia_node!(builder, (u, v) -> u + v, inputs=[u, v], name=:z)
2222
set_return_node!(builder, z)
2323
ir = build_ir(builder)
2424
bar = eval(generate_generative_function(ir, :bar, track_diffs=false, cache_julia_nodes=false))
25+
@test occursin("== Static IR ==", repr("text/plain", ir))
2526

2627
#@gen (static, nojuliacache) function foo(a, b)
2728
#@param theta::Float64
@@ -45,6 +46,7 @@ w = add_julia_node!(builder, (z, a, theta) -> z + 1 + a + theta, inputs=[z, a, t
4546
set_return_node!(builder, w)
4647
ir = build_ir(builder)
4748
foo = eval(generate_generative_function(ir, :foo, track_diffs=false, cache_julia_nodes=false))
49+
@test occursin("== Static IR ==", repr("text/plain", ir))
4850

4951
theta_val = rand()
5052
set_param!(foo, :theta, theta_val)
@@ -58,6 +60,7 @@ one = add_constant_node!(builder, 2)
5860
set_return_node!(builder, one)
5961
ir = build_ir(builder)
6062
const_fn = eval(generate_generative_function(ir, :const_fn, track_diffs=false, cache_julia_nodes=false))
63+
@test occursin("== Static IR ==", repr("text/plain", ir))
6164

6265
Gen.load_generated_functions()
6366

0 commit comments

Comments
 (0)