Metadata#
- class cutlass.operators.metadata.base.OperatorMetadata(
- operator_name: str,
- operator_class: type[Operator],
- supported_targets: list[TargetSm],
- operands: OperandsMetadata,
- design: DesignMetadata | None = None,
- epilogue: EpilogueMetadataBase | None = None,
Bases:
objectOperatorMetadata exposes a uniform schema to inspect the properties of an Operator.
It allows users to programmatically and uniformly inspect properties of an Operator without manually inspecting its source code, and without learning a different schema of properties for each Operator.
It describes fixed properties of the Operator in three categories:
OperandsMetadata: properties of the operands passed to the Operator and the constraints it places on them. It describes the conditions for an Operator to functionally support (compute the correct result of) an operation.DesignMetadata: architectural, performance, or design characteristics of the kernel. Useful for inspecting and comparing otherwise functionally equivalent Operators.EpilogueMetadata: any custom epilogue computation that was fused into the Operator.
These properties are declared by the
Operatoritself when it is instantiated, and are fixed after that.They may be determined by design, or the Operator’s implementation may be parametrized to generate instances supporting different values of a metadata field.
- operator_name: str#
A unique human-readable Operator name.
Important
There are no backward-compatibility guarantees for these names, even for patch releases. Users are strongly advised to not use these names for filtering, and use metadata fields instead.
- operator_class: type[Operator]#
The derived class of cutlass.operators.Operator that implements interfaces to expose a DSL kernel
- supported_targets: list[TargetSm]#
Supported targets that this Operator can be compiled for
Only the earliest portable target in each architecture family is reported, as support for future targets is implied.
Examples
supported_targets=[TargetSm("100f"), TargetSm("120f")]implies support for["100a", "103a", ... , "120a", "121a", ...]for all members of100f&120farch familiessupported_targets=[TargetSm("80")]implies support for["80","89","90","90a","100", ...]
To check if this Operator is supported on a desired target_sm, use
target_sm.supports_operators_from(supported_targets).
- operands: OperandsMetadata#
per-operand constraints and any operand-independent choices (e.g. the accumulator type for a GEMM).
- Type:
Describes the per-operand requirements of the Operator
- design: DesignMetadata | None = None#
Describes characteristics of the design & implementation of the Operator
- epilogue: EpilogueMetadataBase | None = None#
Describes the custom epilogue of the Operator.
- property provider: Provider#
The
Providerthat this Operator’s class is registered with.
- supports(
- args: RuntimeArguments | None,
- *,
- target_sm: TargetSm | str | None = None,
Check if the provided
args/target_smsatisfy the properties described by this OperatorMetadata.- Parameters:
args (RuntimeArguments | None) – Check if Operator supports these RuntimeArguments. Can be explicitly set to None, in order to check only target_sm.
target_sm (TargetSm | str | None) – Check if Operator can be compiled/ran on given TargetSm architecture, if any.
- Returns:
Status indicating whether the args/target_sm are supported, and reason for failure if not.
- Return type:
- Raises:
ValueError – If both args and target_sm are None.
Operands metadata#
- class cutlass.operators.metadata.operands.OperandsMetadata#
Bases:
ABCDescribes properties expected of the logical operands passed to an Operator.
It describes the conditions under which an Operator can correctly execute a given
RuntimeArguments. It mirrors the fields of aRuntimeArgumentssubclass implemented by the Operator, and describes requirements placed on each field. For instance,GemmOperandsMetadatamirrorsGemmArguments.RuntimeArgumentsdescribes what operation the user wishes to perform, independent of which Operator will perform it.OperandsMetadatadescribes conditions under which anOperatorcan accept and correctly executeRuntimeArgumentspassed to it.If an Operator’s
OperandsMetadatasupports theRuntimeArgumentspresented by a user, then it produces functionally correct result for those RuntimeArguments.- abstract supports(args: RuntimeArguments) Status#
Check whether
argssatisfy the operand requirements described by this metadata.- Parameters:
args (RuntimeArguments) – Runtime arguments to validate.
- Returns:
Status indicating whether
argssatisfy the operand requirements described by this metadata.- Return type:
- class cutlass.operators.metadata.operands.GemmOperandsMetadata(
- A: OperandConstraints,
- B: OperandConstraints,
- out: OperandConstraints,
- accumulator_type: Numeric,
Bases:
OperandsMetadataDescribes conditions under which an Operation functionally supports
GemmArguments.- A: OperandConstraints#
Constraints on operand
Aof the GEMM
- B: OperandConstraints#
Constraints on operand
Bof the GEMM
- out: OperandConstraints#
Constraints on operand
outof the GEMM
- supports(
- other: GemmArguments | GemmOperandsMetadata,
Check whether
otherarguments or metadata are compatible with GEMM operands described by this metadata.- Parameters:
other (GemmArguments | GemmOperandsMetadata) – Either runtime
GemmArgumentsor a peerGemmOperandsMetadatato validate.- Returns:
Status.success()if every operand and the accumulator type match, otherwiseStatus.fail(...)with the first failing operand’s reason.- Return type:
- class cutlass.operators.metadata.operands.GroupedGemmOperandsMetadata(
- A: OperandConstraints,
- B: OperandConstraints,
- out: OperandConstraints,
- offsets: OperandConstraints,
- accumulator_type: Numeric,
Bases:
IndexPtrGroupedGemmOperandsMetadataCompatibility metadata for the released M-offset grouped GEMM API.
- class cutlass.operators.metadata.operands.IndexPtrGroupedGemmOperandsMetadata(
- A: OperandConstraints,
- B: OperandConstraints,
- out: OperandConstraints,
- offsets: OperandConstraints,
- offsets_along: Literal['m', 'n', 'k'],
- accumulator_type: Numeric,
- offsets_value_divisibility: int = 1,
- accumulate_on_output: bool = False,
Bases:
OperandsMetadataOperand constraints for M/N/K index-pointer grouped GEMM operations.
- A: OperandConstraints#
Constraints on dense operand
A.
- B: OperandConstraints#
Constraints on dense operand
B.
- out: OperandConstraints#
Constraints on dense operand
out.
- offsets: OperandConstraints#
Constraints on the grouped-problem boundary tensor.
- offsets_along: Literal['m', 'n', 'k']#
Logical GEMM dimension partitioned by
offsets.
- offsets_value_divisibility: int = 1#
Minimum divisibility of every
offsetsvalue required by this Operator.A block-scaled Operator that reuses the data boundaries as its scale-factor boundaries records the scale-factor padding here, so a caller whose promise is weaker than that simply does not match it.
- accumulate_on_output: bool = False#
Whether the Operator adds each GEMM result to the existing output.
- class cutlass.operators.metadata.operand_constraints.OperandConstraints#
Bases:
ABCAbstract base class describing the constraints an Operator places on an Operand.
An instance of this class describes the requirements an Operator places on one
Operand, such as its data type, stride pattern, divisibility, and pointer alignment.- abstract supports(
- operand: Operand | OperandConstraints,
Check whether
operandsatisfies these constraints.- Parameters:
operand (Operand | OperandConstraints) – The runtime operand or another constraints object to check against
self.- Returns:
Status.success()whenoperandis accepted, otherwiseStatus.fail(...)with a human-readable reason.- Return type:
- class cutlass.operators.metadata.operand_constraints.DenseTensorConstraints(
- dtype: Numeric,
- stride: tuple[int, ...] | None,
- divisibility: int,
- ptr_alignment_bytes: int | None = None,
Bases:
OperandConstraintsConstraints on a single
DenseTensor.Describes the data type, stride pattern, divisibility, and pointer alignment that an Operator requires a
DenseTensorto satisfy.- stride: tuple[int, ...] | None#
The stride of the tensor. If none, any arbitrary stride is allowed.
- divisibility: int#
The divisibility requirement on a tensor’s stride and shape elements
- ptr_alignment_bytes: int#
The alignment of the tensor’s data pointer, in bytes By default, it matches the number of bytes in stride/shape alignment.
- supports(
- operand: DenseTensor | DenseTensorConstraints,
Check whether
operandsatisfies the constraints described by this object.- Parameters:
operand (Operand | OperandConstraints) – Operand or peer constraints object to validate.
- Returns:
Status.success()if accepted,Status.fail(...)otherwise.- Return type:
- class cutlass.operators.metadata.operand_constraints.ScaledOperandConstraints(
- quantized: DenseTensorConstraints,
- scale: DenseTensorConstraints,
- mode: ScaleMode | tuple[int, ...],
- swizzle: ScaleSwizzleMode,
Bases:
OperandConstraintsConstraints on a scaled (quantized + scale-factor) operand.
A scaled operand combines a quantized tensor and a scale tensor with a chosen scale mode + scale swizzle. Constraints on each piece are carried in
quantizedandscale;supports()checks all four.- quantized: DenseTensorConstraints#
Constraints on the narrow-precision tensor holding the quantized values.
- scale: DenseTensorConstraints#
Constraints on the scale-factor tensor.
- swizzle: ScaleSwizzleMode#
Swizzling pattern used within scale factor tensor
- supports(
- operand: ScaledOperand | ScaledOperandConstraints,
Check whether
operandsatisfies these scaled-operand constraints.
Design metadata#
- class cutlass.operators.metadata.design.DesignMetadata#
Bases:
ABCDescribes architectural, performance, or design characteristics of the kernel separate from its functional contribution.
These properties do not directly alter the logical result of the Operator. Instead, they distinguish the design characteristics of otherwise logically-equivalent Operators, and can be used to guide Operator selection and performance characterization.
This could include properties like:
inherent design choices like which MMA instruction it uses, or use of other architectural features
its performance options, tile scheduling algorithm, etc.
its tile shape, cluster shape, number of shared memory stages, etc.
- abstract supports(
- args: RuntimeArguments,
- target_sm: TargetSm | None = None,
Checks whether the provided
argssatisfy the properties described by this DesignMetadata.It validates that
PerformanceControlswithinargs.performanceare supported by the Operator with this DesignMetadata.DesignMetadatadoes not directly influence the logical result of the Operator, and thus does not affect what logical operands can be supported inRuntimeArguments.- Parameters:
args (RuntimeArguments) – The arguments to check support for.
target_sm (TargetSm | None) – The target SM to check support for. If None, skips arch-specific checks.
- Returns:
Status indicating whether the provided args satisfy the properties described by the design in this metadata
- Return type:
- class cutlass.operators.metadata.design.BLASDesignMetadata(
- *,
- mma_instruction_type: type[MmaInstruction],
- tile_shape: tuple[int, ...],
- cluster_shape: tuple[int, ...],
- num_smem_stages: int | None = None,
Bases:
DesignMetadataDesign metadata for a BLAS (basic-linear algebra subprogram) operation, like GEMM.
It describes fields common to many kernels that perform BLAS-like operations, such as tile/cluster shape, MMA instruction type, etc.
- mma_instruction_type: type[MmaInstruction]#
The type of the MMA instruction used by the Operator, if any.
- tile_shape: tuple[int, ...]#
Shape of the threadblock-level tile
- cluster_shape: tuple[int, ...]#
Shape of the cluster used in terms of threadblocks
- num_smem_stages: int | None#
Number of shared memory buffers used to pipeline data loading and computation. When None, the Operator determines this internally.
- supports(
- args: RuntimeArguments,
- target_sm: TargetSm | None = None,
Checks whether the provided args satisfy the properties described by the design in this metadata.
- Parameters:
args (RuntimeArguments) – The arguments to check support for
target_sm (TargetSm | None) – The target SM to check support for. If None, skips arch-specific checks.
- Returns:
Status indicating whether the provided args satisfy the properties described by the design in this metadata
- Return type:
- class cutlass.operators.metadata.design.Sm100DesignMetadata(
- use_2cta_mma: bool,
- use_tma_store: bool,
- tile_scheduler: TileSchedulerMetadata | None = None,
- fallback_cluster_shape: tuple[int, ...] | None = None,
- pdl: ProgrammaticDependentLaunchMetadata = ProgrammaticDependentLaunchMetadata(early_launch_dependent=False, early_start=None),
- *,
- mma_instruction_type: type[MmaInstruction],
- tile_shape: tuple[int, ...],
- cluster_shape: tuple[int, ...],
- num_smem_stages: int | None = None,
Bases:
BLASDesignMetadataDesign metadata for operators in the SM100 architecture family.
- use_2cta_mma: bool#
Whether to use a 2CTA MMA instruction
- use_tma_store: bool#
Whether to use TMA to store the results of the operation
- tile_scheduler: TileSchedulerMetadata | None#
Describes the tile scheduling strategy used by the Operator
- fallback_cluster_shape: tuple[int, ...] | None#
Fallback cluster shape for preferred cluster mode.
When
None(default), the Operator uses a single fixed cluster shape (BLASDesignMetadata.cluster_shape). When set:the Operator uses two cluster shapes:
cluster_shapeas the preferred (larger) shape andfallback_cluster_shapeas the smaller fallback for tiles that cannot fill a full preferred cluster.Preferred cluster depth (Z dimension) must be the same as that of fallback cluster.
Fallback cluster shape must evenly divide the preferred cluster shape.
- max_cluster_size: ClassVar[int] = 16#
Maximum non-portable cluster size allowed by sm100f architecture.
- mma_instruction_type: type[MmaInstruction]#
The type of the MMA instruction used by the Operator, if any.
- tile_shape: tuple[int, ...]#
Shape of the threadblock-level tile
- cluster_shape: tuple[int, ...]#
Shape of the cluster used in terms of threadblocks
- num_smem_stages: int | None#
Number of shared memory buffers used to pipeline data loading and computation. When None, the Operator determines this internally.
- pdl: ProgrammaticDependentLaunchMetadata#
Programmatic Dependent Launch capabilities for this design.
- supports(
- args: RuntimeArguments,
- target_sm: TargetSm | None = None,
Checks whether the provided args satisfy the properties described by the design in this metadata.
- use_fallback_cluster() bool#
Return True when this design uses a preferred (larger) and fallback (smaller) cluster shape.
- class cutlass.operators.metadata.design.Sm107DesignMetadata(use_2cta_mma: bool, use_tma_store: bool, tile_scheduler: TileSchedulerMetadata | None = None, fallback_cluster_shape: tuple[int, ...] | None = None, pdl: ProgrammaticDependentLaunchMetadata = ProgrammaticDependentLaunchMetadata(early_launch_dependent=False, early_start=None), enable_breuse: bool = False, data_driven_sync: ~cutlass.operators.metadata.design.data_driven_sync.DataDrivenSyncMetadata = <factory>, *, mma_instruction_type: type[MmaInstruction], tile_shape: tuple[int, ...], cluster_shape: tuple[int, ...], num_smem_stages: int | None = None)#
Bases:
Sm100DesignMetadataDesign metadata for operators in the SM107 architecture family.
- enable_breuse: bool#
Whether the kernel retains each B tile for a second MMA along M.
- max_cluster_size: ClassVar[int] = 30#
Maximum non-portable cluster size allowed by sm107 architecture.
- mma_instruction_type: type[MmaInstruction]#
The type of the MMA instruction used by the Operator, if any.
- tile_shape: tuple[int, ...]#
Shape of the threadblock-level tile
- cluster_shape: tuple[int, ...]#
Shape of the cluster used in terms of threadblocks
- num_smem_stages: int | None#
Number of shared memory buffers used to pipeline data loading and computation. When None, the Operator determines this internally.
- use_2cta_mma: bool#
Whether to use a 2CTA MMA instruction
- use_tma_store: bool#
Whether to use TMA to store the results of the operation
- tile_scheduler: TileSchedulerMetadata | None#
Describes the tile scheduling strategy used by the Operator
- fallback_cluster_shape: tuple[int, ...] | None#
Fallback cluster shape for preferred cluster mode.
When
None(default), the Operator uses a single fixed cluster shape (BLASDesignMetadata.cluster_shape). When set:the Operator uses two cluster shapes:
cluster_shapeas the preferred (larger) shape andfallback_cluster_shapeas the smaller fallback for tiles that cannot fill a full preferred cluster.Preferred cluster depth (Z dimension) must be the same as that of fallback cluster.
Fallback cluster shape must evenly divide the preferred cluster shape.
- pdl: ProgrammaticDependentLaunchMetadata#
Programmatic Dependent Launch capabilities for this design.
- data_driven_sync: DataDrivenSyncMetadata#
Data-driven synchronization metadata about whether Operator is producer/consumer.
Typically paired with PDL.
- supports(
- args: RuntimeArguments,
- target_sm: TargetSm | None = None,
Ensures runtime arguments satisfy the design metadata.
- Parameters:
args (RuntimeArguments) – The arguments to check support for.
target_sm (TargetSm | None) – The target SM to check support for. If None, skips arch-specific checks.
- Returns:
Status indicating whether the provided args satisfy the design metadata.
- Return type:
- class cutlass.operators.metadata.design.TileSchedulerMetadata(
- persistence: PersistenceMetadata,
- reduction: ReductionMetadata,
- rasterization: RasterizationMetadata,
Bases:
objectA tile scheduler fully described by three strategy axes.
PersistenceMetadata– whether the kernel is persistent and how that persistence is driven.ReductionMetadata– whether (and how) the GEMM’s K reduction is split across tiles.RasterizationMetadata– the order in which tiles are scheduled.
- supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,
Returns all the supported targets for the tile scheduler.
Considers optional design and operands metadata when determining which targets are supported.
- supports(args: RuntimeArguments) Status#
Checks whether arguments are supported by the tile scheduler metadata.
An unspecified
args.performance, and the...default fortile_scheduler_controls, both express no opinion and are accepted.args.performance=Noneasks for an operator without performance controls, andtile_scheduler_controls=Noneasks for one without a tile scheduler; this metadata satisfies neither. Otherwise every requested setting must fall inside the domain this scheduler offers.- Parameters:
args (RuntimeArguments) – The arguments to check support for.
- Returns:
Success, or a failure naming the unsupported control.
- Return type:
- class cutlass.operators.metadata.design.NonPersistentMetadata#
Bases:
PersistenceMetadataA non-persistent tile scheduler that launches one CTA per tile.
- classmethod arg_name() str#
Returns the commonly used name for this persistence strategy for kernel arguments.
- classmethod supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,
Returns all the supported targets for the non-persistent mode.
- class cutlass.operators.metadata.design.StaticPersistentMetadata#
Bases:
PersistenceMetadataA statically persistent scheduler that reuses CTAs across tiles.
- classmethod arg_name() str#
Returns the commonly used name for this persistence strategy for kernel arguments.
- classmethod supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,
Returns all the supported targets for the static persistent mode.
- class cutlass.operators.metadata.design.CLCDynamicPersistentMetadata#
Bases:
PersistenceMetadataA CLC-driven dynamically persistent tile scheduler.
- classmethod arg_name() str#
Returns the commonly used name for this persistence strategy for kernel arguments.
- classmethod supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,
Returns all the supported targets for the CLC dynamic persistent mode.
- class cutlass.operators.metadata.design.NoReductionMetadata#
Bases:
ReductionMetadataA reduction strategy that does not split the K dimension.
- classmethod arg_name() str#
Returns the commonly used name for this reduction strategy for kernel arguments.
- classmethod supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,
Returns all the supported targets for the no-reduction strategy.
- class cutlass.operators.metadata.design.SplitKReductionMetadata(
- split_count: tuple[int, ...] | AnyValue[int] | None = None,
Bases:
ReductionMetadataA reduction strategy that splits the K dimension into multiple tiles.
- classmethod arg_name() str#
Returns the commonly used name for this reduction strategy for kernel arguments.
- classmethod supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,
Returns all the supported targets for the split-K reduction strategy.
- class cutlass.operators.metadata.design.ClusterSplitKReductionMetadata(split_count: tuple[int] | None = None)#
Bases:
ReductionMetadataA reduction strategy that splits K with cluster awareness.
Contains a compile-time setting for split_count.
- classmethod arg_name() str#
Returns the commonly used name for this reduction strategy for kernel arguments.
- classmethod supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,
Returns all the supported targets for the cluster split-K reduction strategy.
- class cutlass.operators.metadata.design.NoRasterizationMetadata#
Bases:
RasterizationMetadataA rasterization strategy that does not rasterize the tiles.
- classmethod arg_name() str#
Returns the commonly used name for this rasterization strategy for kernel arguments.
- classmethod supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,
Returns all the supported targets for the no-rasterization strategy.
- class cutlass.operators.metadata.design.TileSwizzleRasterizationMetadata(
- raster_order: tuple[RasterOrder, ...] | None = None,
- swizzle_size: tuple[int, ...] | AnyValue[int] | None = None,
Bases:
RasterizationMetadataA rasterization strategy using a raster-order + swizzle pattern.
- classmethod arg_name() str#
Returns the commonly used name for this rasterization strategy for kernel arguments.
- classmethod supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,
Returns all the supported targets for the raster-order + swizzle strategy.
- class cutlass.operators.metadata.design.EarlyStartMetadata(
- independent_operands: Iterable[str] = (),
Bases:
objectMetadata for compiling a kernel with PDL early-start support.
- independent_operands: Iterable[str]#
Operands that may load without waiting on the PDL dependency.
An empty iterable means all operands are dependent and must wait. The names are validated against the kernel’s declared operands by
OperatorMetadata.
- class cutlass.operators.metadata.design.ProgrammaticDependentLaunchMetadata(
- early_launch_dependent: bool = False,
- early_start: EarlyStartMetadata | None = None,
Bases:
objectDescribe a kernel’s Programmatic Dependent Launch (PDL) capabilities.
PDL allows a dependent kernel to begin executing before its producer has completed. A launch can use same-stream serialization, a programmatic CUDA event, or both.
early_launch_dependentindicates whether the kernel can signal dependent kernels.early_startindicates whether the kernel can start as a consumer before its producer completes.
- early_launch_dependent: bool#
Whether this kernel supports signaling dependent kernels for early launch.
- early_start: EarlyStartMetadata | None#
Whether the kernel can start before its producer completes.
Optional independent operands may load without waiting for the producer.
- supports(
- runtime_pdl_controls: ProgrammaticDependentLaunchControl | None,
Check whether PDL metadata supports the requested runtime controls.
- is_enabled() bool#
Whether PDL is enabled.
- class cutlass.operators.metadata.design.DataDrivenSyncMetadata(
- *,
- producer: DataDrivenSyncProducerMetadata | None = None,
- consumer: DataDrivenSyncConsumerMetadata | None = None,
Bases:
objectDescribe an operator’s data-driven synchronization capabilities.
Data-driven synchronization allows a consumer operator to read producer-written operands before the producer operator has completed and fully computed its output. This metadata records whether an operator can produce such data, consume it, or both.
The primary synchronization mechanism is the use of a sentinel pattern to communicate whether the chunk of data is ready to be read. The producer prepares the output tensor with the sentinel pattern before writing the computed results. The consumer polls the output tensor chunks and once a chunk has no sentinel pattern, then it is considered valid and can be read.
The sentinel pattern is defined by the TMA
report_validload and is typically-0.0encoded for that data type. Scale factors use NaN0xffas the sentinel pattern. Software emulation of data-driven synchronization is not supported at this time.Typically used in conjunction with PDL to overlap the producer and consumer launches for concurrent reads/writes to the synchronized tensor.
- For the full up-to-date details on validity reporting (
report_valid):
- producer: DataDrivenSyncProducerMetadata | None#
Capabilities for producing data streamed to data-driven sync consumers.
- consumer: DataDrivenSyncConsumerMetadata | None#
Capabilities for consuming operands streamed by data-driven sync producers.
- supports(
- perf_controls: DataDrivenSyncControls,
- target_sm: TargetSm | None = None,
Check whether the runtime controls are supported on
target_sm.Unfulfilled requested capabilities are reported in one status.
- Parameters:
perf_controls (DataDrivenSyncControls) – Runtime producer/consumer role requests to validate against this metadata.
target_sm (TargetSm | None) – Target compute capability to validate against, if known.
- Returns:
Status.success()if every requested role is supported, otherwiseStatus.fail(...)describing each unfulfilled request.- Return type:
- is_enabled() bool#
Return whether this operator supports either data-driven synchronization role.
- For the full up-to-date details on validity reporting (
- class cutlass.operators.metadata.design.DataDrivenSyncProducerMetadata(
- *,
- minimum_atomic_write_bytes: int = 0,
- output_sentinel_prefill: bool = True,
Bases:
objectProducer-side data-driven synchronization metadata.
A data-driven sync producer writes output that consumers may load and compute upon before the producer operator completes, using the sentinel pattern to denote data readiness.
Completed output must never contain a legitimate sentinel pattern, because consumers interpret that pattern as unwritten data. As such, operator is responsible with canonicalizing computed output before writes.
The sentinel pattern is defined as
-0.0for data tensors and0xfffor scale factors on sm107a. For other architectures, please refer to PTX documentation.- SM107A_MINIMUM_ATOMIC_WRITE_BYTES: ClassVar[int] = 16#
Minimum atomic output write size, in bytes, that sm107a TMA
report_validconsumers require.
- REPORT_VALID_ATOMIC_WRITE_TARGETS: ClassVar[tuple[TargetSm, ...]] = (TargetSm(cc=107, portability=<ArchPortability.ArchConditional: 3>), TargetSm(cc=107, portability=<ArchPortability.FamilyPortable: 2>))#
Targets whose TMA
report_validconsumers requireSM107A_MINIMUM_ATOMIC_WRITE_BYTESwrites.
- minimum_atomic_write_bytes: int#
Minimum size, in bytes, of an atomic output write. Auxiliary scale factors are excluded from this requirement.
- output_sentinel_prefill: bool#
Whether the operator prefills the output with the TMA
report_validsentinel pattern before consumer launch.When
False, the Operator’s caller must initialize the output with the sentinel pattern and request that behavior withinDataDrivenSyncControls.
- supports(
- producer_controls: DataDrivenSyncProducer,
- target_sm: TargetSm | None = None,
Check whether the runtime producer controls are supported on
target_sm.- Parameters:
producer_controls (DataDrivenSyncProducer) – Runtime producer controls to validate against this metadata.
target_sm (TargetSm | None) – Target compute capability to validate against, if known.
- Returns:
Status.success()if the producer controls are supported, otherwiseStatus.fail(...)describing the reason.- Return type:
- class cutlass.operators.metadata.design.DataDrivenSyncConsumerMetadata(
- *,
- consumed_operands: tuple[str, ...] = (),
Bases:
objectConsumer-side data-driven synchronization metadata.
A data-driven sync consumer reads producer-written operands with TMA
report_validloads. A retry warp must reissue TMAreport_validloads until the data is valid.- consumed_operands: tuple[str, ...]#
Operands this operator loads with
report_validenabled.Requested operands must not produce the TMA
report_validsentinel pattern as a valid output value.
- supports(
- perf_controls: DataDrivenSyncConsumer,
- target_sm: TargetSm | None = None,
Check whether the runtime consumer controls request supported operands.
- Parameters:
perf_controls (DataDrivenSyncConsumer) – Runtime consumer controls to validate against this metadata.
target_sm (TargetSm | None) – Unused; kept for signature symmetry with the producer and aggregate
supportsmethods.
- Returns:
Status.success()if the requested consumed operand set matches exactly, otherwiseStatus.fail(...)describing the mismatch.- Return type:
Epilogue metadata#
- class cutlass.operators.metadata.epilogue.EpilogueMetadataBase#
Bases:
ABCCommon metadata interface for custom and fixed epilogues.
- abstract supports(args: RuntimeArguments) Status#
Check whether runtime arguments satisfy this epilogue metadata.
- class cutlass.operators.metadata.epilogue.EpilogueMetadata(epilogue_args: EpilogueArguments)#
Bases:
EpilogueMetadataBaseDescribes properties related to custom EpilogueArguments that an Operator may support.
- classmethod from_args(
- args: EpilogueArguments,
Creates an EpilogueMetadata from an EpilogueArguments.
- property parameters: list[cute.Tensor | Numeric]#
Returns the list of input and output parameters of the epilogue.
- property parameter_names: list[str]#
Returns the list of names of the input and output parameters of the epilogue.
- supports(args: RuntimeArguments) Status#
Checks if the provided EpilogueArguments are supported by the Operator.
- class cutlass.operators.metadata.epilogue.PerGroupScaleEpilogueMetadata(
- global_scale_a: DenseTensorConstraints | None = None,
- global_scale_b: DenseTensorConstraints | None = None,
Bases:
EpilogueMetadataBaseConstraints for a
PerGroupScaleEpilogueArgumentsfixed epilogue.- global_scale_a: DenseTensorConstraints | None = None#
Constraints for A’s per-group scale, or None when the scale is omitted.
- global_scale_b: DenseTensorConstraints | None = None#
Constraints for B’s per-group scale, or None when the scale is omitted.
- supports(
- args: RuntimeArguments,
Check whether runtime arguments provide compatible per-group scales.
MMA instructions#
- class cutlass.operators.mma.MmaInstruction#
Bases:
objectModels properties of an abstract MMA instruction.
- static supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,
Return all the supported targets for the MMA instruction, given optional design and operands metadata.
- static shape_k(operands: OperandsMetadata) int#
Return the K dimension of the shape of matrix multiplication performed by this instruction.
- class cutlass.operators.mma.BlackwellTcgen05Mma#
Bases:
MmaInstructionModels the tcgen05.mma instruction for the Blackwell architecture.
- classmethod supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,
- static shape_k(operands: OperandsMetadata) int#
- class cutlass.operators.mma.RubinTcgen05Mma#
Bases:
MmaInstructionModels the
tcgen05MMA instruction for the Rubin architecture.- classmethod supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,
- classmethod shape_k_for_dtypes( ) int#
Return the instruction K for an A/B operand dtype pair.
Provided alongside
shape_k()for callers that carry bare dtypes rather than anOperandsMetadata: 128 for FP4 pairs, 64 for FP8 pairs, 8 for F32/TF32 and 16 for F16/BF16.
- classmethod shape_k(operands: OperandsMetadata) int#
- class cutlass.operators.mma.BlackwellTcgen05MmaSparse#
Bases:
MmaInstructionModels the tcgen05.mma.sp instruction for the Blackwell architecture.
- static supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,
- class cutlass.operators.mma.HopperWgmma#
Bases:
MmaInstructionModels the wgmma Tensor Core MMA instruction for the Hopper architecture.
- classmethod supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,
- class cutlass.operators.mma.AmpereMma#
Bases:
MmaInstructionModels the Tensor Core MMA instruction for the Ampere architecture.
- classmethod supported_targets(
- design: DesignMetadata | None = None,
- operands: OperandsMetadata | None = None,