Skip to content

[FEA]: Support CU_LAUNCH_ATTRIBUTE_PRIORITY in LaunchConfig #2631

Closed

Description

@lijinf2

Is this a duplicate?

Area

cuda.core

Is your feature request related to a problem? Please describe.

LaunchConfig does not expose CU_LAUNCH_ATTRIBUTE_PRIORITY, which sets the launch priority for a kernel.

Parent tracking: #496.

Describe the solution you'd like

  • Users can set CU_LAUNCH_ATTRIBUTE_PRIORITY via LaunchConfig.
  • Mapping to the native launch attribute is tested.

Describe alternatives you've considered

Use cuda.bindings.driver (CUlaunchAttribute / CU_LAUNCH_ATTRIBUTE_PRIORITY) 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 (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.

Activity

  1. added
    featureNew feature or request
    cuda.coreEverything related to the cuda.core module
    on Aug 14, 2026
  2. changed the title [-][FEA]: Add support for CU_LAUNCH_ATTRIBUTE_PRIORITY in LaunchConfig[/-] [+][FEA]: Support CU_LAUNCH_ATTRIBUTE_PRIORITY in LaunchConfig[/+] on Aug 18, 2026
  3. ichensun commented on Aug 25, 2026

    @ichensun
    Contributor

    The goal is to expose CUDA's per-kernel launch priority through cuda.core.LaunchConfig, avoiding the need for users to construct CUlaunchAttribute manually with cuda.bindings.

    We can add an optional priority field to LaunchConfig, declaring its Cython storage in _launch_config.pyd, and maping supplied values to CU_LAUNCH_ATTRIBUTE_PRIORITY and CUlaunchAttributeValue.priority in both native-conversion paths in _launch_config.pyx. Preserve the distinction between omitted priority and explicit priority=0.

  4. lijinf2 commented on Aug 25, 2026

    @lijinf2
    ContributorAuthor

    Hi @ichensun I am on the same page that cuda.core.LaunchConfig is for when users don't set CUlaunchAttribute manually.

    Adding a priority field and implementation plan in cython layer look good. Please also add test cases about setter/getter and/or explore if it is possible to test a policy at runtime (looks complicated can be in a separate PR).

  5. moved this from Todo to Done in CCCLon Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

cuda.coreEverything related to the cuda.core modulefeatureNew feature or request

Type

No type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions