We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87a78ae commit e1a4bb2Copy full SHA for e1a4bb2
1 file changed
torch/_dynamo/variables/tensor.py
@@ -1886,6 +1886,7 @@ def method_new_tensor(
1886
if layout.as_python_constant() != torch.strided:
1887
return None
1888
fwd_kwargs = dict(kwargs)
1889
+ fwd_kwargs.pop("layout", None)
1890
fwd_kwargs.setdefault("dtype", self.var_getattr(tx, "dtype"))
1891
fwd_kwargs.setdefault("device", self.var_getattr(tx, "device"))
1892
return variables.TorchInGraphFunctionVariable(torch.tensor).call_function(
0 commit comments