Skip to content

Commit

Permalink
Update fori_loop.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ManfeiBai committed Mar 4, 2024
1 parent 2d569ad commit c7f09d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torch_xla/experimental/fori_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _xla_while_loop(cond_fn, body_fn, operands):
cond_result = cond_fn(operands)
cond_ctx = torch_xla._XLAC.lowering.LoweringContext()
cond_ctx.set_name_string("condctx")
cond_ctx.build_for_while(list(cond_result))
cond_ctx.build(list(cond_result))
cond_hlo = cond_ctx.hlo()
cond_computation = xb.computation_from_module_proto("condcomputation",
cond_hlo)
Expand All @@ -43,7 +43,7 @@ def _xla_while_loop(cond_fn, body_fn, operands):
body_result = body_fn(operands)
body_ctx = torch_xla._XLAC.lowering.LoweringContext()
body_ctx.set_name_string("bodyctx")
body_ctx.build_for_while(list(body_result))
body_ctx.build(list(body_result))
body_hlo = body_ctx.hlo()
body_computation = xb.computation_from_module_proto("bodycomputation",
body_hlo)
Expand Down

0 comments on commit c7f09d5

Please sign in to comment.