-
Notifications
You must be signed in to change notification settings - Fork 895
Rewrite the GPUPool in Rust (#2243) #2277
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
Open
YaxinCheng
wants to merge
33
commits into
cocoindex-io:main
Choose a base branch
from
YaxinCheng:gpu_pool
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,468
−306
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
829279b
Add GPUPool in the core rust code
YaxinCheng 5365787
Switch python to use rust GPUPool
YaxinCheng a05e77e
Updated unit tests for GPUPool
YaxinCheng bba983b
Add function to acquire integer number of gpus
YaxinCheng 953cf0d
Add back comments
YaxinCheng 89c4646
Add clarification on the acquire full gpus
YaxinCheng 527bc4f
release.notify_one() instead of notify_all() to avoid the thundering …
YaxinCheng 4d0dbab
Expose acquire_full to python
YaxinCheng 2f85c53
acquire_full returns error instead of crash
YaxinCheng b231cf7
Updated the comment
YaxinCheng 95422da
Explicit waiting queue for GPUPool
YaxinCheng 73e4e51
Add a Waiter struct for readability
YaxinCheng 81af87f
Introduce GPU reservation for GPUs that are not currently available. …
YaxinCheng ed40a2d
Use try_join_all to better handle error
YaxinCheng d8a0c04
Update the functions to return errors when unexpected values are pass…
YaxinCheng e6eb8d4
find_available no longer finds the max, but finds the amount that is …
YaxinCheng 567c2ad
Introduce GPUFraction type which handles f32 to usize, and handles th…
YaxinCheng 70cd5d2
find_available no longer finds the max, but finds the amount that is …
YaxinCheng 9043f87
Add a few traits to GPUFraction, and also make SCALE private
YaxinCheng 4379ee0
Revamped queuing and handling strategy
YaxinCheng 1c2c325
Code cleanup to improve readability
YaxinCheng 808f869
Updated scheduling and reserving strategy
YaxinCheng dd3ba9f
Add comments and improve code readability
YaxinCheng 6e7f512
Fix code based on comments
YaxinCheng a7acfd0
releas is now sync
YaxinCheng f7b088d
Fix code based on comments
YaxinCheng 95c229e
Clean up
YaxinCheng eeba17d
Merge find excluding
YaxinCheng b574039
Updated tests
YaxinCheng 2251496
Update function names
YaxinCheng 53365a1
The queue is no longer strict FIFO
YaxinCheng 54031e6
Use the right length
YaxinCheng ee61291
Release acquired GPUs when reservation is cancelled
YaxinCheng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,3 +44,4 @@ examples/**/uv.lock | |
|
|
||
| # Claude Code local state | ||
| .claude/*.lock | ||
| .idea/ | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.