Skip to content

[FEA]: Add support for CU_LAUNCH_ATTRIBUTE_IGNORE in LaunchConfig #2625

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_IGNORE (id = 0), the sentinel that marks an unused CUlaunchAttribute slot for the driver to skip.

Parent tracking: #496.

Describe the solution you'd like

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

Describe alternatives you've considered

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

Example (C API) — agent-generated; reviewed but not executed:

// Fixed-size attribute array; unused slots marked IGNORE
CUlaunchAttribute attrs[4];

attrs[0].id = CU_LAUNCH_ATTRIBUTE_COOPERATIVE;
attrs[0].value.cooperative = 1;

attrs[1].id = CU_LAUNCH_ATTRIBUTE_PRIORITY;
attrs[1].value.priority = 0;

attrs[2].id = CU_LAUNCH_ATTRIBUTE_IGNORE;
attrs[3].id = CU_LAUNCH_ATTRIBUTE_IGNORE;

CUlaunchConfig config = {
    .gridDimX = 128, .gridDimY = 1, .gridDimZ = 1,
    .blockDimX = 256, .blockDimY = 1, .blockDimZ = 1,
    .sharedMemBytes = 0,
    .hStream = stream,
    .attrs = attrs,
    .numAttrs = 4
};
cuLaunchKernelEx(&config, kernel, NULL, NULL);

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions