mlir.dialects.transform.x86

Classes

ApplyMathRsqrtApproximationPatternsOp

Collect patterns that approximate vectorized f32 math.rsqrt operations

ApplyMathRsqrtApproximationPatternsOpAdaptor

ApplyMoveAccumulatorForContractLoopPatternsOp

Rewrites an additive vector contraction by zeroing the accumulator input

ApplyMoveAccumulatorForContractLoopPatternsOpAdaptor

ApplyPrepareVectorContractLoopsPatternsOp

Collect patterns that prepare vector contraction loops for x86 lowering.

ApplyPrepareVectorContractLoopsPatternsOpAdaptor

ApplyShuffleVectorFMAOpsPatternsOp

Collect patterns to shuffle FMAs with x86 operations as operands

ApplyShuffleVectorFMAOpsPatternsOpAdaptor

ApplySinkVectorProducerOpsPatternsOp

Collect patterns to sink vector producer operations forward in a block to

ApplySinkVectorProducerOpsPatternsOpAdaptor

ApplyVectorContractBF16ToFMAPatternsOp

Collect patterns to lower a BF16 type vector.contract operation

ApplyVectorContractBF16ToFMAPatternsOpAdaptor

ApplyVectorContractMultiLevelUnrollForAMXPatternsOp

Collect patterns that tile and unroll contractions in order to prepare them

ApplyVectorContractMultiLevelUnrollForAMXPatternsOpAdaptor

ApplyVectorContractToAMXDotProductPatternsOp

Collect patterns to lower a BF16/Int8 type vector.contract operation

ApplyVectorContractToAMXDotProductPatternsOpAdaptor

ApplyVectorContractToFMAPatternsOp

Collect patterns to lower a F32 type vector.contract operation to a FMA.

ApplyVectorContractToFMAPatternsOpAdaptor

ApplyVectorContractToPackedTypeDotProductPatternsOp

Collect patterns to lower a BF16/Int8 type vector.contract operation

ApplyVectorContractToPackedTypeDotProductPatternsOpAdaptor

Functions

Module Contents

class mlir.dialects.transform.x86.ApplyMathRsqrtApproximationPatternsOp(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None)

Bases: _ods_ir

Collect patterns that approximate vectorized f32 math.rsqrt operations using the AVX vrsqrtps instruction (x86.avx.rsqrt) followed by one Newton-Raphson step. The inner vector dimension must be a multiple of 8.

OPERATION_NAME = 'transform.apply_patterns.x86.math_rsqrt_approximation'
_ODS_REGIONS = (0, True)
class mlir.dialects.transform.x86.ApplyMathRsqrtApproximationPatternsOpAdaptor

Bases: _ods_ir

OPERATION_NAME = 'transform.apply_patterns.x86.math_rsqrt_approximation'
mlir.dialects.transform.x86.apply_patterns_x86_math_rsqrt_approximation(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None) → ApplyMathRsqrtApproximationPatternsOp
class mlir.dialects.transform.x86.ApplyMoveAccumulatorForContractLoopPatternsOp(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None)

Bases: _ods_ir

Rewrites an additive vector contraction by zeroing the accumulator input and materializing the accumulation as a separate add after the contraction.

OPERATION_NAME = 'transform.apply_patterns.x86.move_accumulator_for_contract_loop'
_ODS_REGIONS = (0, True)
class mlir.dialects.transform.x86.ApplyMoveAccumulatorForContractLoopPatternsOpAdaptor

Bases: _ods_ir

OPERATION_NAME = 'transform.apply_patterns.x86.move_accumulator_for_contract_loop'
mlir.dialects.transform.x86.apply_patterns_x86_move_accumulator_for_contract_loop(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None) → ApplyMoveAccumulatorForContractLoopPatternsOp
class mlir.dialects.transform.x86.ApplyPrepareVectorContractLoopsPatternsOp(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None)

Bases: _ods_ir

Collect patterns that prepare vector contraction loops for x86 lowering.

OPERATION_NAME = 'transform.apply_patterns.x86.prepare_vector_contract_loops'
_ODS_REGIONS = (0, True)
class mlir.dialects.transform.x86.ApplyPrepareVectorContractLoopsPatternsOpAdaptor

Bases: _ods_ir

OPERATION_NAME = 'transform.apply_patterns.x86.prepare_vector_contract_loops'
mlir.dialects.transform.x86.apply_patterns_x86_prepare_vector_contract_loops(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None) → ApplyPrepareVectorContractLoopsPatternsOp
class mlir.dialects.transform.x86.ApplyShuffleVectorFMAOpsPatternsOp(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None)

Bases: _ods_ir

Collect patterns to shuffle FMAs with x86 operations as operands such that FMAs are grouped with respect to odd/even packed index.

OPERATION_NAME = 'transform.apply_patterns.x86.shuffle_vector_fma_ops'
_ODS_REGIONS = (0, True)
class mlir.dialects.transform.x86.ApplyShuffleVectorFMAOpsPatternsOpAdaptor

Bases: _ods_ir

OPERATION_NAME = 'transform.apply_patterns.x86.shuffle_vector_fma_ops'
mlir.dialects.transform.x86.apply_patterns_x86_shuffle_vector_fma_ops(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None) → ApplyShuffleVectorFMAOpsPatternsOp
class mlir.dialects.transform.x86.ApplySinkVectorProducerOpsPatternsOp(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None)

Bases: _ods_ir

Collect patterns to sink vector producer operations forward in a block to place them immediately before their first use.

OPERATION_NAME = 'transform.apply_patterns.x86.sink_vector_producer_ops'
_ODS_REGIONS = (0, True)
class mlir.dialects.transform.x86.ApplySinkVectorProducerOpsPatternsOpAdaptor

Bases: _ods_ir

OPERATION_NAME = 'transform.apply_patterns.x86.sink_vector_producer_ops'
mlir.dialects.transform.x86.apply_patterns_x86_sink_vector_producer_ops(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None) → ApplySinkVectorProducerOpsPatternsOp
class mlir.dialects.transform.x86.ApplyVectorContractBF16ToFMAPatternsOp(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None)

Bases: _ods_ir

Collect patterns to lower a BF16 type vector.contract operation to a FMA via emulation lowering using BF16 packed operations.

OPERATION_NAME = 'transform.apply_patterns.x86.vector_contract_bf16_to_fma'
_ODS_REGIONS = (0, True)
class mlir.dialects.transform.x86.ApplyVectorContractBF16ToFMAPatternsOpAdaptor

Bases: _ods_ir

OPERATION_NAME = 'transform.apply_patterns.x86.vector_contract_bf16_to_fma'
mlir.dialects.transform.x86.apply_patterns_x86_vector_contract_bf16_to_fma(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None) → ApplyVectorContractBF16ToFMAPatternsOp
class mlir.dialects.transform.x86.ApplyVectorContractMultiLevelUnrollForAMXPatternsOp(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None)

Bases: _ods_ir

Collect patterns that tile and unroll contractions in order to prepare them for the AMX nanokernel lowerings.

OPERATION_NAME = 'transform.apply_patterns.x86.vector_contract_multi_level_unroll_for_amx'
_ODS_REGIONS = (0, True)
class mlir.dialects.transform.x86.ApplyVectorContractMultiLevelUnrollForAMXPatternsOpAdaptor

Bases: _ods_ir

OPERATION_NAME = 'transform.apply_patterns.x86.vector_contract_multi_level_unroll_for_amx'
mlir.dialects.transform.x86.apply_patterns_x86_vector_contract_multi_level_unroll_for_amx(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None) → ApplyVectorContractMultiLevelUnrollForAMXPatternsOp
class mlir.dialects.transform.x86.ApplyVectorContractToAMXDotProductPatternsOp(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None)

Bases: _ods_ir

Collect patterns to lower a BF16/Int8 type vector.contract operation to a BF16/Int8 AMX tiled dot-product.

OPERATION_NAME = 'transform.apply_patterns.x86.vector_contract_to_amx_dot_product'
_ODS_REGIONS = (0, True)
class mlir.dialects.transform.x86.ApplyVectorContractToAMXDotProductPatternsOpAdaptor

Bases: _ods_ir

OPERATION_NAME = 'transform.apply_patterns.x86.vector_contract_to_amx_dot_product'
mlir.dialects.transform.x86.apply_patterns_x86_vector_contract_to_amx_dot_product(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None) → ApplyVectorContractToAMXDotProductPatternsOp
class mlir.dialects.transform.x86.ApplyVectorContractToFMAPatternsOp(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None)

Bases: _ods_ir

Collect patterns to lower a F32 type vector.contract operation to a FMA.

OPERATION_NAME = 'transform.apply_patterns.x86.vector_contract_to_fma'
_ODS_REGIONS = (0, True)
class mlir.dialects.transform.x86.ApplyVectorContractToFMAPatternsOpAdaptor

Bases: _ods_ir

OPERATION_NAME = 'transform.apply_patterns.x86.vector_contract_to_fma'
mlir.dialects.transform.x86.apply_patterns_x86_vector_contract_to_fma(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None) → ApplyVectorContractToFMAPatternsOp
class mlir.dialects.transform.x86.ApplyVectorContractToPackedTypeDotProductPatternsOp(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None)

Bases: _ods_ir

Collect patterns to lower a BF16/Int8 type vector.contract operation to a BF16/Int8 dot-product.

OPERATION_NAME = 'transform.apply_patterns.x86.vector_contract_to_packed_type_dot_product'
_ODS_REGIONS = (0, True)
class mlir.dialects.transform.x86.ApplyVectorContractToPackedTypeDotProductPatternsOpAdaptor

Bases: _ods_ir

OPERATION_NAME = 'transform.apply_patterns.x86.vector_contract_to_packed_type_dot_product'
mlir.dialects.transform.x86.apply_patterns_x86_vector_contract_to_packed_type_dot_product(*, loc: _ods_ir | None = None, ip: _ods_ir | None = None) → ApplyVectorContractToPackedTypeDotProductPatternsOp