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

Is there a way to export a warmed up graph so that it is ready to go from cold boot? #224

Closed
amazingvince opened this issue Dec 19, 2022 · 4 comments
Assignees
Labels
question Further information is requested stale stale issue

Comments

@amazingvince
Copy link

I have not tried straight pickle but did not see any documentation about exporting model.

@pommedeterresautee
Copy link
Member

PyTorch 2.0 has a way to save on disk and reload compiled Triton kernels.
Using their API should save lots of time during the warmup.
We just merged a merge to a recent version of PyTorch 2.0 so I guess it's very doable to just call their API to launch Triton kernels instead of the original Triton one.

However, a CUDA graph can't be exported and reused.
The main reason is that kernels are re-executed with their parameters.
Those parameters include gpu memory addresses.
And it's very likely that your tensor memory address will change from launch to launch (if you quit Python session and the CUDA pool is freed).

It's certainly possible in theory to update the graph parameters, but it seems very hard, so probably better to just rerun the warmup (without recompiling triton kernel ofc).

@pommedeterresautee
Copy link
Member

@amazingvince FYI we have found a way to speedup warmup significantly in #234.

@github-actions
Copy link

This issue is marked as stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale stale issue label Feb 11, 2023
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested stale stale issue
Projects
None yet
Development

No branches or pull requests

2 participants