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

[Fx Importer] fix mutation importer with non persistent buffer #3798

Conversation

dixinzhou
Copy link
Contributor

A non-persistent buffer will not be a part of this module’s state_dict. Hence when setting experimental_support_mutation=True and have non-persistent buffer, the current fx importer will fail to retrieve a value from state_dict and produce torch.constant.none to represent the buffer. This fix get value of non-persistent buffer from the module's constants.

@dixinzhou
Copy link
Contributor Author

Hi @stellaraccident . I don't have permission to request review yet. I am tagging you here as you were the original author for support mutation in Exported Program. Do you mind taking a look at this change? Thanks!

@stellaraccident
Copy link
Collaborator

Thanks, yes I'll review. It might take me a bit as it takes me a minute to context switch and make sure I understand what is going on in this part.

@dixinzhou
Copy link
Contributor Author

Hi @stellaraccident, a gentle reminder to review this pull request when you get a chance. Thank you!

@stellaraccident
Copy link
Collaborator

Sorry - have been busy. I will review tomorrow

@penguin-wwy penguin-wwy merged commit 8f52f5a into llvm:main Oct 31, 2024
3 checks passed
@dixinzhou dixinzhou deleted the fix-mutation-importer-with-non-persistent-buffer branch October 31, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants