-
Notifications
You must be signed in to change notification settings - Fork 977
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
use the correct available memory API for XPU #3076
Conversation
torch.xpu.max_memory_allocated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Overall this looks good to me, let's use device_index
however rather than i
(or something similar to avoid single-letter input names)
thanks for pointing this out! Code Updated. I also added a version check. |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Hi @muellerzr , how do you think about the new update? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought about it a bit more, let's:
- Move this to
utils.memory
- Use the new implementation I've shown, which takes care of things a bit cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! This looks much cleaner :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM. I have a clarifying question, but it's not a blocker.
ok, I think we can merge now. 😊 |
What does this PR do?
This PR introduces the new API for get xpu available memory. Below is an example of before and after:
Before
After