IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo struct

LaunchAttribute

struct LaunchAttribute

Represents a complete launch attribute with ID and value.

This struct combines a LaunchAttributeID and LaunchAttributeValue to form a complete attribute that can be passed to GPU kernel launches. It provides a way to specify various execution parameters that control kernel behavior.

These are CUDA only, and are not supported on any other target.

Fields​

  • ​id (LaunchAttributeID): The identifier specifying the type of this launch attribute.
  • ​value (LaunchAttributeValue): The value associated with this launch attribute.

Implemented traits​

AnyType, Copyable, Defaultable, Deinitable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable

Methods​

__init__​

def __init__() -> Self

Initializes a new LaunchAttribute with IGNORE ID and zeroed value.

def __init__(id: LaunchAttributeID, value: LaunchAttributeValue) -> Self

Initializes a LaunchAttribute with a specific ID and value.

Args:

def __init__(policy: AccessPolicyWindow) -> Self

Initializes a LaunchAttribute from an AccessPolicyWindow.

Creates a launch attribute with ACCESS_POLICY_WINDOW ID and the provided policy.

Args:

from_cluster_dim​

static def from_cluster_dim(dim: Dim) -> Self

Creates a LaunchAttribute for cluster dimensions.

Creates a launch attribute with CLUSTER_DIMENSION ID and the provided dimensions.

Args:

  • ​dim (Dim): The dimensions to use for this attribute.

Returns:

Self: A new LaunchAttribute configured with the specified cluster dimensions.