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

[Contrib] Support NDArray cache taking generator #16693

Merged

Conversation

MasterJH5574
Copy link
Contributor

This PR enhances the dump_ndarray_cache function to take generator as input. Previously it can only take a dictionary.

Sometimes, it is possible that the total ndarray size cannot fit the main CPU memory, in which case we may turn to using generators so we can free some NDArray memory on the fly. And this PR supports the NDArray cache dumping with generators.

Copy link
Member

@tqchen tqchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor nitsm otherwise LGTM

python/tvm/contrib/tvmjs.py Outdated Show resolved Hide resolved
python/tvm/contrib/tvmjs.py Show resolved Hide resolved
This PR enhances the `dump_ndarray_cache` function to take
generator as input. Previously it can only take a dictionary.

Sometimes, it is possible that the total ndarray size cannot
fit the main CPU memory, in which case we may turn to using
generators so we can free some NDArray memory on the fly.
And this PR supports the NDArray cache dumping with generators.
@MasterJH5574 MasterJH5574 force-pushed the tvm-dev/2024-03-09-ndcache-generator branch from 4a9e986 to 16a83c8 Compare March 9, 2024 21:45
@tqchen tqchen merged commit 639a6e4 into apache:main Mar 10, 2024
19 checks passed
Lunderberg pushed a commit to Lunderberg/tvm that referenced this pull request Mar 12, 2024
This PR enhances the `dump_ndarray_cache` function to take
generator as input. Previously it can only take a dictionary.

Sometimes, it is possible that the total ndarray size cannot
fit the main CPU memory, in which case we may turn to using
generators so we can free some NDArray memory on the fly.
And this PR supports the NDArray cache dumping with generators.
thaisacs pushed a commit to thaisacs/tvm that referenced this pull request Apr 3, 2024
This PR enhances the `dump_ndarray_cache` function to take
generator as input. Previously it can only take a dictionary.

Sometimes, it is possible that the total ndarray size cannot
fit the main CPU memory, in which case we may turn to using
generators so we can free some NDArray memory on the fly.
And this PR supports the NDArray cache dumping with generators.
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

2 participants