Skip to content

Commit

Permalink
Dont wrap ints in torch.tensor;
Browse files Browse the repository at this point in the history
as it tickles the bug #6538
  • Loading branch information
qihqi committed Feb 15, 2024
1 parent 29b01c6 commit e4d8643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch_xla/stablehlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def call_function(self, target, args: Tuple, kwargs: Dict) -> Any:
args = tuple(
map(
lambda arg_spec: torch.tensor(arg_spec[0])
if isinstance(arg_spec[0], (float, int)) and type(arg_spec[
if isinstance(arg_spec[0], float) and type(arg_spec[
1].type) == torch.TensorType else arg_spec[0],
args_and_specs))
return super().call_function(target, args, new_kwargs)
Expand Down

0 comments on commit e4d8643

Please sign in to comment.