Skip to content

Commit

Permalink
test range
Browse files Browse the repository at this point in the history
  • Loading branch information
ManfeiBai committed Mar 21, 2024
1 parent b32e2c2 commit f9331ae
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 @@ -31,10 +31,10 @@ def cond_fn(upper, lower, *init_vals):

def body_fn(upper, lower, *init_vals):
# one_value_original = torch.tensor(1, dtype=torch.int32, device=device)
# (a, b) = init_vals
(a, b) = init_vals
# return (upper, torch.add(lower, 1), body_fun(a, b), b.clone())
# return (upper.clone(), (torch.add(lower.clone(), init_vals[1].clone())).clone(), (body_fun(*init_vals)).clone(), init_vals[1].clone()) # init_vals[1:])
return (upper, (torch.add(lower, init_vals[1])), (body_fun(*init_vals)), init_vals[1]) # init_vals[1:])
return (upper, (torch.add(lower, b)), (body_fun(*init_vals)), b) # init_vals[1:])
# (body_fun(*init_vals)).clone(), init_vals[1].clone())
# body_fun(one_value_original, init_val)) # body_fun(lower, init_val))

Expand Down

0 comments on commit f9331ae

Please sign in to comment.