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

"Compile” doesn't work on GPU #479

Open
encorechow opened this issue Jun 27, 2024 · 1 comment
Open

"Compile” doesn't work on GPU #479

encorechow opened this issue Jun 27, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@encorechow
Copy link

pytorch version: 2.3.1+cu121

I've tried to use compile=True in load function, it is super slow to generate results, and I didn't see any GPU utilizition with nvidia-smi like below (a liitle memory ocuupied like 1GB):
企业微信截图_17194899582803

after I commented out the code block below, GPU utilization turns normal, and result is generated much much faster:
企业微信截图_17194900322602
企业微信截图_17194900872413

I cant understand why the torch.compile function didn't work well. Does anyone know why?

@fumiama
Copy link
Member

fumiama commented Jun 27, 2024

The compile only shows its effect when you run a generating process continuously with the same input shape. If you only run it once, it will slow down the generation.

@fumiama fumiama added the documentation Improvements or additions to documentation label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants