Skip to content

Commit e1a4bb2

Browse files
committed
fix: remove layout argument from fwd_kwargs in TensorVariable
1 parent 87a78ae commit e1a4bb2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

torch/_dynamo/variables/tensor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,6 +1886,7 @@ def method_new_tensor(
18861886
if layout.as_python_constant() != torch.strided:
18871887
return None
18881888
fwd_kwargs = dict(kwargs)
1889+
fwd_kwargs.pop("layout", None)
18891890
fwd_kwargs.setdefault("dtype", self.var_getattr(tx, "dtype"))
18901891
fwd_kwargs.setdefault("device", self.var_getattr(tx, "device"))
18911892
return variables.TorchInGraphFunctionVariable(torch.tensor).call_function(

0 commit comments

Comments
 (0)