-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable MiscTests.test_map_side_effects to work with nn module inlining #126355
Comments
First anyway its not allowed to mutate the nn module variable from with in the map operation, the error message is different due to the following:
is triggered, this is not triggered when inlining is enabled because obj in that case is UnspecializedNNModuleVariable.
|
We have two options here:
|
IMO it should be possible for Dynamo to trace through NN module mutations |
ex2: this does not work
@ezyang do you think we should make ex2 also work above ? it is treated with inlining enabled as a UserDefinedObjectVariable |
If map is the hop, no I don't expect it to work, but this should have failed without nn module inlining too :P |
yep it is failing both ways. Just the error message changed |
TORCHDYNAMO_INLINE_INBUILT_NN_MODULES=1 python test/dynamo/test_misc.py -k MiscTests.test_map_side_effects
error:
cc @mruberry @jbschlosser @walterddr @mikaylagawarecki @ezyang @msaroufim @bdhirsh @anijain2305 @chauhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng
The text was updated successfully, but these errors were encountered: