Skip to content
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

Investigate Error "f capturable=True, params and state_steps must be CUDA or XLA tensors" when nn module inlining enabled. #125393

Closed
laithsakka opened this issue May 2, 2024 · 5 comments
Assignees
Labels
module: dynamo module: nn Related to torch.nn module: optimizer Related to torch.optim oncall: pt2

Comments

@laithsakka
Copy link
Contributor

laithsakka commented May 2, 2024

REPO:
enable nn module inlinining then run
TORCHDYNAMO_INLINE_INBUILT_NN_MODULES=1 PYTORCH_TEST_WITH_DYNAMO=1 python test/test_quantization.py -k test_qat_embeddingbag_linear

PYTORCH_TEST_WITH_DYNAMO=1 TORCHDYNAMO_INLINE_INBUILT_NN_MODULES=1 python test/test_quantization.py -k test_resnet_base

nine total failures with this message, check: https://hud.pytorch.org/pr/125354
cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @vincentqb @janeyx99 @crcrpar @ezyang @msaroufim @bdhirsh @anijain2305 @chauhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng

@laithsakka laithsakka added the module: nn Related to torch.nn label May 2, 2024
@laithsakka
Copy link
Contributor Author

note: those only fails when dynamo is enabled on the test

@laithsakka laithsakka self-assigned this May 2, 2024
@mikaylagawarecki mikaylagawarecki added the module: optimizer Related to torch.optim label May 2, 2024
@janeyx99
Copy link
Contributor

janeyx99 commented May 2, 2024

What is module inlining/how does this affect the optimizer?

This looks like an optimizer error that happens when capturable is flipped on but the state is not ready to be captured.

@laithsakka
Copy link
Contributor Author

I had offline chat with @mlazos he is already working on this or something very close to this, he said he will take over

@laithsakka
Copy link
Contributor Author

@mlazos @anijain2305 this is fixed with recent Lazos changes

@laithsakka
Copy link
Contributor Author

fixed by #125826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: dynamo module: nn Related to torch.nn module: optimizer Related to torch.optim oncall: pt2
Projects
None yet
Development

No branches or pull requests

4 participants