mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[Meta Tensor] fix meta inplace set storage (#123880)
Fixes #123879 Co-authored-by: Edward Z. Yang <ezyang@meta.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/123880 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
c3c4465f50
commit
c511aed27f
@ -1265,7 +1265,7 @@ class MetaConverter:
|
||||
mb_fake_mode = maybe_get_fake_mode(r)
|
||||
if mb_fake_mode is not None:
|
||||
maybe_fake_mgr = in_kernel_invocation_manager(mb_fake_mode)
|
||||
with maybe_fake_mgr, torch.no_grad():
|
||||
with maybe_fake_mgr, torch.no_grad(), maybe_suppress():
|
||||
r.set_(r_s, storage_offset, sizes, strides)
|
||||
|
||||
if t.grad is not None:
|
||||
|
Reference in New Issue
Block a user