Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: torch.export failure caused by
_make_causal_mask
(#35291)
* bugfix: torch.export failure caused by `_make_causal_mask` Recent changes in torch dynamo prevent mutations on tensors converted with aten::_to_copy. To address this, we can clone such tensor before performing in-place operation `masked_fill_` only when the code is being compiled by torch dynamo. (relevant issue: pytorch/pytorch#127571) * chore: use `is_torchdynamo_compiling` instead of `torch._dynamo.is_compiling`
- Loading branch information