torch.compile
fails when applied to tensor views that have been modified by in-place operators
#113793
Labels
module: aotdispatch
umbrella label for AOTAutograd issues
oncall: pt2
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃悰 Describe the bug
When running
torch.compile
on a function that takes a view of a tensor and modifies it in-place, we run into the runtime error:This is needed when applying
torch.compile
onto the step function of our Distributed Shampoo implementation, where we similarly create views of the parameters and update them in-place.Interestingly, when we run this code on an earlier version of PyTorch (2.0.1), we did not observe this issue. If we remove the
return param_view
, we also do not observe the error.This issue is related to the following issues: #99968 (comment) #11390 (comment).
cc: @tsunghsienlee @shintaro-iwasaki @minddrummer @csmiler @mlazos @bdhirsh @yuchenhao
Error logs
Minified repro
Versions
cc @ezyang @msaroufim @bdhirsh @anijain2305 @zou3519 @chauhang @wconstab
The text was updated successfully, but these errors were encountered: