[WIP][Core][GPU fraction] Change StrictPack to check availability per-bundle instead of aggregated bundle to prevent false positive - #62344
Conversation
…aggregating to prevent false positive Signed-off-by: dancingactor <s990346@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request updates the BundleStrictPackSchedulingPolicy to perform per-bundle resource checks, avoiding the limitations of aggregated resource requests. Feedback highlights that pre-filtering of candidate nodes using the aggregated request still occurs and should be removed to ensure the fix is effective. Other recommendations include using RAY_CHECK for consistency when restoring resources and optimizing the allocated_requests vector with reserve.
Signed-off-by: dancingactor <s990346@gmail.com>
- add RAY_CHECK for AddNodeAvailableResources Signed-off-by: dancingactor <s990346@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
Reviewed by Cursor Bugbot for commit 0ae717d. Configure here.
21f2611 to
7352c36
Compare
Signed-off-by: dancingactor <s990346@gmail.com>
7352c36 to
4d5dceb
Compare
|
Thank you! Please also consider adding a performance changes section in the description. |
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |

PR Description
This PR is the first step in fixing the
STRICT_PACKfalse positive issue during node availability checks.To completely resolve this issue, we are taking a two-step approach:
StrictPackcheck availability per-bundle instead of the aggregated bundleNodeResourcesto track per-instance availability,SubtractNodeAvailableResourcesandAddNodeAvailableResourceswill be updated to perform per-instance manipulation instead of scalar mathSTRICT_PACKFalse Positive ProblemCurrently, scheduling relies on aggregated scalar values. For example, consider a node with two GPUs, each with
0.5availability (an aggregated capacity of1.0). IfSTRICT_PACKneeds to schedule two bundles requiring0.1and0.7GPUs, the aggregated request is0.8.The scheduler sees
0.8 <= 1.0and incorrectly assumes the node is a valid fit. However, during local allocation, the node actually can't fit the0.7bundle, resulting in a false positive and unnecessary spillbacks.Solution
Instead of checking the availability of an aggregated bundle, we evaluate each bundle individually using the following way:
SubtractNodeAvailableResources.AddNodeAvailableResourcesand reject the node.Note: Once
SubtractNodeAvailableResourcesis updated in the upcoming PR, we will be able to use it directly to determine whether a node can fit a specific bundle, bypassing the need for a separateNodeResources::IsAvailablecheck.Testing
This logic successfully passes StrictPackFractionalUnitResourceTest, which is not included in this PR since it relies on the
NodeResources::availabledata structure changes introduced in the upcoming PRRelated PR
Related to #62005