-
-
Notifications
You must be signed in to change notification settings - Fork 793
[XPU] Implemented 32bit optimizers in triton #1710
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
Merged
matthewdouglas
merged 5 commits into
bitsandbytes-foundation:main
from
YangKai0616:32bit_optimizer
Sep 15, 2025
Merged
[XPU] Implemented 32bit optimizers in triton #1710
matthewdouglas
merged 5 commits into
bitsandbytes-foundation:main
from
YangKai0616:32bit_optimizer
Sep 15, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jiqing-feng
reviewed
Jul 18, 2025
|
Hi @matthewdouglas , would you please review this PR? Thanks! |
|
@matthewdouglas , could you pls help review this PR and #1692, thx very much |
matthewdouglas
approved these changes
Sep 15, 2025
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.
Looks good to me, thank you!
77cce6e to
810e8cb
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on #1692.
Implemented 32bit optimizers in triton to use of XPU devices.
The PR includes two implementations:
For the benchmarking on
4096*4096shapes, the results are as follows:Pure Torch implementation:
Pure Triton implementation:
For the benchmarking on
1024*1024shapes, the results are as follows:Pure Torch implementation:
Pure Triton implementation:
The test platform is Intel(R) Data Center GPU Max 1550. Test script reference #1692. Torch(eager) is 32bit optimizer from torch, BNB is 32bit optimizer.
Considering that the performance gap between torch.compile and Triton implementations is not significant, but triton's implementation compiles faster, and #1692 was implemented with Triton, this PR adopts the Triton version for submission.
Note:Currently, XPU does not support the allocation of memory buffers using a paging mechanism. Therefore, these tests are skipped in
tests/test_optim.py::test_optimizer32bit. This functionality will be developed in the future to support full optimizer capabilities.