[go: nahoru, domu]

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

Clone the module into a new context to erase the unused tensors from memory. #70322

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

copybara-service[bot]
Copy link
@copybara-service copybara-service bot commented Jun 25, 2024

Clone the module into a new context to erase the unused tensors from memory.

Ideally, unused tensors cleaned-up during DCE must not consume any memory but they currently do. This is due to how MLIRContext is designed and this has been addressed with the introduction of DenseResourceElementsAttr in MLIR.

This is a temporary workaround until we are able to use the DenseResourceElementsAttr to store the model checkpoint weights.

@copybara-service copybara-service bot force-pushed the exported_pr_645520361 branch 5 times, most recently from 865aa92 to f5982d1 Compare June 28, 2024 17:43
…memory.

Ideally, unused tensors cleaned-up during DCE must not consume any memory but they currently do. This is due to how MLIRContext is designed and this has been addressed with the introduction of DenseResourceElementsAttr in MLIR.

This is a temporary workaround until we are able to use the DenseResourceElementsAttr to store the model checkpoint weights.

PiperOrigin-RevId: 647742961
@copybara-service copybara-service bot closed this Jun 28, 2024
@copybara-service copybara-service bot deleted the exported_pr_645520361 branch June 28, 2024 19:05
@copybara-service copybara-service bot merged commit df25ab1 into master Jun 28, 2024
1 check passed
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.

None yet

1 participant