Skip to content

feat(cuda.core): add cluster scheduling policy to LaunchConfig - #2703

Open
atiaomar1978-hub wants to merge 4 commits into
NVIDIA:mainfrom
atiaomar1978-hub:feat/launch-config-cluster-scheduling-policy-2629-signed
Open

feat(cuda.core): add cluster scheduling policy to LaunchConfig#2703
atiaomar1978-hub wants to merge 4 commits into
NVIDIA:mainfrom
atiaomar1978-hub:feat/launch-config-cluster-scheduling-policy-2629-signed

Conversation

@atiaomar1978-hub

Copy link
Copy Markdown
Contributor

Description

closes #2629

Add cluster_scheduling_policy_preference to LaunchConfig, mapping to
CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE via
ClusterSchedulingPolicyType (DEFAULT, SPREAD, LOAD_BALANCING).

Unlike stream synchronization policy (#2628), cluster scheduling policy is
documented as valid for graph nodes and kernel launches, so LaunchConfig is
the correct surface.

This is a signed re-issue of #2702 (same change, linear history on current
main). Commits are SSH-signed. GitHub would not reopen #2668.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Test plan

  • Native attribute mapping for DEFAULT / SPREAD / LOAD_BALANCING
  • Getter/setter round-trip for each policy
  • Driver enum acceptance; invalid value rejection; CC < 9.0 gate
  • Combined cluster + policy attributes
  • Hopper+ launch() smoke for all three policies
  • RunPod H100 80GB HBM3 / driver 580 / CTK 13.3 — 13 passed, 0 skipped
  • pre-commit.ci stubgen-pyx stubs regenerated

@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the cuda.core Everything related to the cuda.core module label Aug 26, 2026
atiaomar1978-hub and others added 4 commits August 25, 2026 17:19
Expose CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE on
LaunchConfig via ClusterSchedulingPolicyType, with validation, CC >= 9.0
gating, and tests mapping to the native launch attribute.

Closes NVIDIA#2629

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Omar Atie <atiaomar1978@gmail.com>
Assert LaunchConfig emits both CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION
and CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE when set.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Omar Atie <atiaomar1978@gmail.com>
Use init_cuda with an inline noop kernel so test_launcher.py does not
depend on the get_saxpy_kernel_cubin fixture from test_module.py.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Omar Atie <atiaomar1978@gmail.com>
…rough

Align NVIDIA#2629 tests with reviewer guidance: round-trip each policy on
LaunchConfig and exercise launch() for DEFAULT/SPREAD/LOAD_BALANCING.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Omar Atie <atiaomar1978@gmail.com>
@atiaomar1978-hub

atiaomar1978-hub commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Hi @lijinf2 — when you have a moment, could you please review this PR?

This is the signed re-issue of #2702 (GitHub would not reopen #2668). It implements the plan we aligned on in #2629: LaunchConfig.cluster_scheduling_policy_preference maps to CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE (DEFAULT / SPREAD / LOAD_BALANCING), with CC >= 9.0 gating.

Tests follow your guidance (getter/setter plus a launch() run-through; no attempt to observe the live scheduler). On RunPod H100 80GB HBM3 (CC 9.0, driver 580, CTK 13.3) the cluster-policy suite is 13 passed, 0 skipped.

I do not have permission to set assignee or milestone on this account; cuda.core 1.3.0 would match the related work if that is still the right milestone.

Sorry for the force-push on this branch. I know rewriting published history is against the project rules. I did it only so the commits would be SSH-signed and show as Verified on GitHub. I will not force-push again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.core Everything related to the cuda.core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA]: Support CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE in LaunchConfig

1 participant