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

Constants are stored two times with JSON Runtime #7981

Closed
echuraev opened this issue May 5, 2021 · 5 comments
Closed

Constants are stored two times with JSON Runtime #7981

echuraev opened this issue May 5, 2021 · 5 comments

Comments

@echuraev
Copy link
Contributor

echuraev commented May 5, 2021

Hello,

I faced the problem that the TVM export methods doesn’t strip original collection of constant tensor in case of usage external runtime like BNNS/ACL and others. First time we store constants in GraphRuntimeFactory when write it to the library and second time in MetadataModule. This leads to double size of final exported files and also increases memory footprint in runtime. In fact, it is enough to store constants only in MetadataModule, and we can strip the original constants. Maybe we could remove original constants from GraphRuntimeFactoryand store them only in MetadataModule?

On the screenshot you can see that the weights were load two times in runtime:
изображение

This problem can be critical for different mobile devices with limited size of RAM.

@comaniac
Copy link
Contributor

comaniac commented May 5, 2021

#7977 should solve this problem.

@echuraev
Copy link
Contributor Author

echuraev commented May 5, 2021

Thank you! I'll check then the PR will be merged.

@tqchen
Copy link
Member

tqchen commented May 13, 2021

ping @echuraev please close the PR if the problem is fixed

@echuraev
Copy link
Contributor Author

ping @echuraev please close the PR if the problem is fixed

Yes, I remember about it. I'll do it soon.

@echuraev
Copy link
Contributor Author

It looks like the problem was fixed. Thank you!

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

No branches or pull requests

3 participants