Skip to content

Commit 122d6e5

Browse files
authored
format
1 parent d689acc commit 122d6e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torch_xla/experimental/fori_loop.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def while_loop(cond_fn, body_fn, operands):
1818
# operands: (Tuple of possibly nested dict/list/tuple of tensors)
1919
return _xla_while_loop(cond_fn, body_fn, operands)
2020

21+
2122
def _xla_while_loop(cond_fn, body_fn, operands):
2223

2324
def op_fn(internal_x):
@@ -33,7 +34,7 @@ def body_fn_placeholder(counter, internal_x):
3334
return xb.Op.tuple((next_counter, internal_x))
3435

3536
zero = xb.Op.scalar(internal_x.builder(), 0, dtype=xb.Type.S32)
36-
w = xb.Op.mkwhile((zero, internal_x), cond_fn_placeholder,
37+
w = xb.Op.mkwhile((zero, internal_x), cond_fn_placeholder,
3738
body_fn_placeholder)
3839
return w.get_tuple_element(1)
3940

0 commit comments

Comments
 (0)