Skip to content

[slice] Validate cube count#1036

Merged
pajakd merged 9 commits intoAI-Hypercomputer:slice-mainfrom
pajakd:validate_cube_count
Feb 18, 2026
Merged

[slice] Validate cube count#1036
pajakd merged 9 commits intoAI-Hypercomputer:slice-mainfrom
pajakd:validate_cube_count

Conversation

@pajakd
Copy link
Collaborator

@pajakd pajakd commented Feb 9, 2026

Description

Additional validation that checks if in the topology assignment returned by Kueue TAS, the number of cubes matches the expected number of cubes (from the topology).

Issue

Testing

@pajakd pajakd marked this pull request as ready for review February 9, 2026 12:36
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we change topology dimensions

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice that these Unit Tests were (by default) using basePodSetAssignment1Wrapper and basePodSetAssignment2Wrapper, which were returning assignments with only a single cube. Also the baseSlice1Wrapper, was a slice with 4x4x12 topology and a single cube.

So, basically we were only testing the path where the number of cubes in a slices did not match the topology (so, the one that was causing the slices to hang as we observed recently). And this is exactly the path that we want to reject with validation in this PR.

So, I had to fix all the Unit Tests.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks

Comment on lines 41 to 44
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is no longer accurate

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

})
basePodSetAssignment2Wrapper := utiltesting.MakePodSetAssignment("ps2").
TopologyAssignment(baseLevels, []kueue.TopologyAssignmentSlice{
utiltesting.MakeTopologyAssignmentSlice(1, []int32{2}).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC this assumes that we can fit two Pods on one Node. While it's not invalid, usually we do 1 pod per node assignment in real-world scenarios. Can we align it in a follow up?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests define 4 nodes, each in a different cube. We can think how to make it more realistic in a followup.

@PBundyra
Copy link
Collaborator

PBundyra commented Feb 16, 2026

LGTM, just nits

@pajakd pajakd merged commit 26a78c2 into AI-Hypercomputer:slice-main Feb 18, 2026
15 of 18 checks passed
@pajakd pajakd deleted the validate_cube_count branch February 18, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments