Skip to content

Commit a29fbed

Browse files
committed
remove redundant cast
1 parent 65d3595 commit a29fbed

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

src/probprog/Modeling.jl

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -339,16 +339,8 @@ function simulate_internal(
339339
1,
340340
)
341341

342-
weight = MLIR.IR.result(
343-
MLIR.Dialects.builtin.unrealized_conversion_cast(
344-
[MLIR.IR.result(simulate_op, 2)];
345-
outputs=[MLIR.IR.TensorType(Int64[], MLIR.IR.Type(Float64))],
346-
),
347-
1,
348-
)
349-
350342
trace = TracedRArray{UInt64,0}((), trace, ())
351-
weight = TracedRArray{Float64,0}((), weight, ())
343+
weight = TracedRArray{Float64,0}((), MLIR.IR.result(simulate_op, 2), ())
352344

353345
return trace, weight, result
354346
end
@@ -507,16 +499,8 @@ function generate_internal(
507499
1,
508500
)
509501

510-
weight = MLIR.IR.result(
511-
MLIR.Dialects.builtin.unrealized_conversion_cast(
512-
[MLIR.IR.result(generate_op, 2)];
513-
outputs=[MLIR.IR.TensorType(Int64[], MLIR.IR.Type(Float64))],
514-
),
515-
1,
516-
)
517-
518502
trace = TracedRArray{UInt64,0}((), trace, ())
519-
weight = TracedRArray{Float64,0}((), weight, ())
503+
weight = TracedRArray{Float64,0}((), MLIR.IR.result(generate_op, 2), ())
520504

521505
return trace, weight, result
522506
end

0 commit comments

Comments
 (0)