You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEA]: Support CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE in LaunchConfig #2629
Users can set CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE via LaunchConfig.
Mapping to the native launch attribute is tested.
Describe alternatives you've considered
Use cuda.bindings.driver (CUlaunchAttribute / CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE) and cuLaunchKernelEx directly.
Downside: leaves cuda.core users without a first-class LaunchConfig API; they must drop to low-level bindings, manage the attribute array themselves, and lose consistency with other LaunchConfig launch attributes (cluster, is_cooperative, programmatic_stream_serialization, etc.).
Additional context
Incremental LaunchConfig attribute coverage under #496 (same approach as #1334 for programmatic_stream_serialization).
No example code in the design notes for this attribute.
changed the title [-]Add support for CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE in LaunchConfig[/-][+][FEA]: Add support for CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE in LaunchConfig[/+]on Aug 14, 2026
changed the title [-][FEA]: Add support for CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE in LaunchConfig[/-][+][FEA]: Support CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE in LaunchConfig[/+]on Aug 18, 2026
Adds LaunchConfig.cluster_scheduling_policy_preference via ClusterSchedulingPolicyType (DEFAULT, SPREAD, LOAD_BALANCING), mapping to CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Unlike #2628 sync policy (stream-only), this attribute is documented as valid for launches/graph nodes, so LaunchConfig is the correct surface.
Tests cover native attribute mapping, validation, CC >= 9.0 gating, and a Hopper+ launch smoke test.
Hi @lijinf2 — following your guidance on #2668, I'm holding off on reopening the PR until the issue is assigned to me.
I've already implemented LaunchConfig.cluster_scheduling_policy_preference (ClusterSchedulingPolicyType, CC >= 9.0 gating, unit tests, and Hopper launch smoke coverage) in the closed PR. GPU validation passed on RunPod (CI-like CUDA 13.3 + driver 580).
When you have a moment, could you please assign #2629 to me (@atiaomar1978-hub)? I'll reopen/update PR #2668 once assigned so review stays aligned with your workflow.
Thanks again for the clear process — happy to adjust anything before resubmitting.
Hi @lijinf2 — following your guidance on #2668, I'm holding off on reopening the PR until the issue is assigned to me.
I've already implemented LaunchConfig.cluster_scheduling_policy_preference (ClusterSchedulingPolicyType, CC >= 9.0 gating, unit tests, and Hopper launch smoke coverage) in the closed PR. GPU validation passed on RunPod (CI-like CUDA 13.3 + driver 580).
When you have a moment, could you please assign #2629 to me (@atiaomar1978-hub)? I'll reopen/update PR #2668 once assigned so review stays aligned with your workflow.
Thanks again for the clear process — happy to adjust anything before resubmitting.
Hi @atiaomar1978-hub — before coding, could you briefly note how you plan to implement and test this?
API on LaunchConfig and mapping to CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE (same pattern as programmatic_stream_serialization.
Tests for that mapping (see test_launcher.py), plus skip conditions if hardware support is required.
Enum in cuda.core.typing: DEFAULT, SPREAD, LOAD_BALANCING (maps to CUclusterSchedulingPolicy)
In _to_native_launch_config, when set, append CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE with clusterSchedulingPolicyPreference
Accept None (driver/kernel default), enum members, or raw CUclusterSchedulingPolicy ints
Gate on CC >= 9.0 (same check as LaunchConfig.cluster)
Tests (test_launcher.py):
Parametrized mapping test: each policy → correct CUlaunchAttributeID + value
Validation: invalid int → ValueError; CC < 9.0 → CUDAError
Combined attrs: cluster + policy → two launch attributes
GPU smoke on Hopper+: launch() with cluster=(2,1,1) + LOAD_BALANCING (skip if CC < 9.0)
I already have a prototype in closed PR #2668; happy to reopen/adjust once #2629 is assigned. Let me know if you'd prefer a different enum name or stricter CC gating.
Hi @lijinf2 — a bit more context on what cluster_scheduling_policy_preference controls, in case it helps review.
Unlike #2628 (sync policy, stream-only), this attribute is documented for launches and graph nodes, so LaunchConfig is the right surface. At a high level:
For this attribute: the flight plan includes how to seat passengers (blocks) across rows (SMs) within one cabin section (cluster) — SPREAD vs LOAD_BALANCING vs "use airline default."
Implementation plan is in my previous comment; prototype remains in closed PR #2668 pending assignment.
Thanks for the plan! The implementation part looks good to me. The testing part it looks like there is no way to test the actual scheduling policy at runtime. It should be good enough to test that getter/setter can work properly, and test that application code runs through when setting policy to DEFAULT/SPREAD/LOAD_BALANCING. Feel free to put up a PR if aligned, or let me know if you have different thoughts.
Please review #2703. Same change as #2702: LaunchConfig.cluster_scheduling_policy_preference maps to CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE.
Tests match your guidance (no attempt to observe the live scheduler):
getter/setter round-trip for DEFAULT / SPREAD / LOAD_BALANCING
native mapping + CC >= 9.0 gate
launch() run-through for all three policies on Hopper+ (skip on CC < 9.0)
Activity
launch_attrinLaunchConfigctor #496[-]Add support for CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE in LaunchConfig[/-][+][FEA]: Add support for CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE in LaunchConfig[/+][-][FEA]: Add support for CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE in LaunchConfig[/-][+][FEA]: Support CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE in LaunchConfig[/+]atiaomar1978-hub commentedon Aug 18, 2026
Implementation PR: #2668
Adds
LaunchConfig.cluster_scheduling_policy_preferenceviaClusterSchedulingPolicyType(DEFAULT,SPREAD,LOAD_BALANCING), mapping toCU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Unlike #2628 sync policy (stream-only), this attribute is documented as valid for launches/graph nodes, so LaunchConfig is the correct surface.Tests cover native attribute mapping, validation, CC >= 9.0 gating, and a Hopper+ launch smoke test.
atiaomar1978-hub commentedon Aug 19, 2026
Hi @lijinf2 — following your guidance on #2668, I'm holding off on reopening the PR until the issue is assigned to me.
I've already implemented
LaunchConfig.cluster_scheduling_policy_preference(ClusterSchedulingPolicyType, CC >= 9.0 gating, unit tests, and Hopper launch smoke coverage) in the closed PR. GPU validation passed on RunPod (CI-like CUDA 13.3 + driver 580).When you have a moment, could you please assign #2629 to me (
@atiaomar1978-hub)? I'll reopen/update PR #2668 once assigned so review stays aligned with your workflow.Thanks again for the clear process — happy to adjust anything before resubmitting.
lijinf2 commentedon Aug 21, 2026
Hi @atiaomar1978-hub — before coding, could you briefly note how you plan to implement and test this?
LaunchConfigand mapping toCU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE(same pattern asprogrammatic_stream_serialization.test_launcher.py), plus skip conditions if hardware support is required.atiaomar1978-hub commentedon Aug 22, 2026
Hi @lijinf2 — thanks for the guidance. Brief plan:
Unlike #2628 (sync policy, stream-only), this attribute is documented for launches and graph nodes, so LaunchConfig is the right surface.
API / mapping (same pattern as
programmatic_stream_serialization):LaunchConfig.cluster_scheduling_policy_preference: ClusterSchedulingPolicyType | Nonecuda.core.typing:DEFAULT,SPREAD,LOAD_BALANCING(maps toCUclusterSchedulingPolicy)_to_native_launch_config, when set, appendCU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCEwithclusterSchedulingPolicyPreferenceNone(driver/kernel default), enum members, or rawCUclusterSchedulingPolicyintsLaunchConfig.cluster)Tests (
test_launcher.py):CUlaunchAttributeID+ valueValueError; CC < 9.0 →CUDAErrorcluster+ policy → two launch attributeslaunch()withcluster=(2,1,1)+LOAD_BALANCING(skip if CC < 9.0)I already have a prototype in closed PR #2668; happy to reopen/adjust once #2629 is assigned. Let me know if you'd prefer a different enum name or stricter CC gating.
Thanks!
atiaomar1978-hub commentedon Aug 22, 2026
Hi @lijinf2 — a bit more context on what
cluster_scheduling_policy_preferencecontrols, in case it helps review.Unlike #2628 (sync policy, stream-only), this attribute is documented for launches and graph nodes, so
LaunchConfigis the right surface. At a high level:LaunchConfig(CPU) →_to_native_launch_config()→CUlaunchConfig(driver) →cuLaunchKernelEx(GPU)cluster=(…)(Hopper+, CC >= 9.0)cluster_scheduling_policy_preferenceHow the driver places blocks inside a thread-block cluster on SMs. Set on
LaunchConfigat launch time;Noneleaves the kernel/driver default.DEFAULTCU_CLUSTER_SCHEDULING_POLICY_DEFAULTSPREADCU_CLUSTER_SCHEDULING_POLICY_SPREADLOAD_BALANCINGCU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCINGMetaphor
LaunchConfig= flight plan written in the office (CPU)CUlaunchConfig= form the control tower uses (driver)For this attribute: the flight plan includes how to seat passengers (blocks) across rows (SMs) within one cabin section (cluster) —
SPREADvsLOAD_BALANCINGvs "use airline default."Implementation plan is in my previous comment; prototype remains in closed PR #2668 pending assignment.
lijinf2 commentedon Aug 25, 2026
@atiaomar1978-hub
Thanks for the plan! The implementation part looks good to me. The testing part it looks like there is no way to test the actual scheduling policy at runtime. It should be good enough to test that getter/setter can work properly, and test that application code runs through when setting policy to DEFAULT/SPREAD/LOAD_BALANCING. Feel free to put up a PR if aligned, or let me know if you have different thoughts.
test(cuda.core): cover cluster policy getter/setter and launch run-th…
atiaomar1978-hub commentedon Aug 25, 2026
Hi @lijinf2 — thanks, the plan is aligned with your note.
GitHub would not reopen closed PR #2668. I first opened #2702 (unsigned commits), then replaced it with a signed re-issue on current
main:#2703
Please review #2703. Same change as #2702:
LaunchConfig.cluster_scheduling_policy_preferencemaps toCU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE.Tests match your guidance (no attempt to observe the live scheduler):
DEFAULT/SPREAD/LOAD_BALANCINGlaunch()run-through for all three policies on Hopper+ (skip on CC < 9.0)RunPod (2026-08-25), NVIDIA H100 80GB HBM3, CC 9.0, driver 580.126.09, CTK 13.3: 13 passed, 0 skipped.
feat(cuda.core): add cluster scheduling policy to LaunchConfig
test(cuda.core): cover cluster policy getter/setter and launch run-th…
feat(cuda.core): add cluster scheduling policy to LaunchConfig (#2703)