
# Autogenerated by mlir-tblgen; don't manually edit.

from ._ods_common import _cext as _ods_cext
from ._ods_common import (
    equally_sized_accessor as _ods_equally_sized_accessor,
    get_default_loc_context as _ods_get_default_loc_context,
    get_op_results_or_values as _get_op_results_or_values,
    segmented_accessor as _ods_segmented_accessor,
)
_ods_ir = _ods_cext.ir
_ods_cext.globals.register_traceback_file_exclusion(__file__)

import builtins
from typing import Any as _Any, Sequence as _Sequence, Union as _Union, Optional as _Optional
import sys as _sys
if _sys.version_info >= (3, 12):
  from collections.abc import Buffer as _Buffer  # pytype: disable=not-supported-yet
else:
  try:
    from typing_extensions import Buffer as _Buffer
  except ImportError:
    _Buffer = _Any


from ._transform_ops_gen import _Dialect

@_ods_cext.register_operation(_Dialect)
class ApplyShuffleVectorFMAOpsPatternsOp(_ods_ir.OpView):
  r"""
  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)

  def __init__(self, *, loc: _Optional[_ods_ir.Location] = None, ip: _Optional[_ods_ir.InsertionPoint] = None):
    operands = []
    attributes = {}
    regions = None
    _ods_context = _ods_get_default_loc_context(loc)
    results = []
    _ods_successors = None
    super().__init__(self.OPERATION_NAME, self._ODS_REGIONS, self._ODS_OPERAND_SEGMENTS, self._ODS_RESULT_SEGMENTS, attributes=attributes, results=results, operands=operands, successors=_ods_successors, regions=regions, loc=loc, ip=ip)

@_ods_cext.register_op_adaptor(ApplyShuffleVectorFMAOpsPatternsOp)
class ApplyShuffleVectorFMAOpsPatternsOpAdaptor(_ods_ir.OpAdaptor):
  OPERATION_NAME = "transform.apply_patterns.x86.shuffle_vector_fma_ops"

def apply_patterns_x86_shuffle_vector_fma_ops(*, loc: _Optional[_ods_ir.Location] = None, ip: _Optional[_ods_ir.InsertionPoint] = None) -> ApplyShuffleVectorFMAOpsPatternsOp:
  return ApplyShuffleVectorFMAOpsPatternsOp(loc=loc, ip=ip)

@_ods_cext.register_operation(_Dialect)
class ApplySinkVectorProducerOpsPatternsOp(_ods_ir.OpView):
  r"""
  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)

  def __init__(self, *, loc: _Optional[_ods_ir.Location] = None, ip: _Optional[_ods_ir.InsertionPoint] = None):
    operands = []
    attributes = {}
    regions = None
    _ods_context = _ods_get_default_loc_context(loc)
    results = []
    _ods_successors = None
    super().__init__(self.OPERATION_NAME, self._ODS_REGIONS, self._ODS_OPERAND_SEGMENTS, self._ODS_RESULT_SEGMENTS, attributes=attributes, results=results, operands=operands, successors=_ods_successors, regions=regions, loc=loc, ip=ip)

@_ods_cext.register_op_adaptor(ApplySinkVectorProducerOpsPatternsOp)
class ApplySinkVectorProducerOpsPatternsOpAdaptor(_ods_ir.OpAdaptor):
  OPERATION_NAME = "transform.apply_patterns.x86.sink_vector_producer_ops"

def apply_patterns_x86_sink_vector_producer_ops(*, loc: _Optional[_ods_ir.Location] = None, ip: _Optional[_ods_ir.InsertionPoint] = None) -> ApplySinkVectorProducerOpsPatternsOp:
  return ApplySinkVectorProducerOpsPatternsOp(loc=loc, ip=ip)

@_ods_cext.register_operation(_Dialect)
class ApplyVectorContractBF16ToFMAPatternsOp(_ods_ir.OpView):
  r"""
  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)

  def __init__(self, *, loc: _Optional[_ods_ir.Location] = None, ip: _Optional[_ods_ir.InsertionPoint] = None):
    operands = []
    attributes = {}
    regions = None
    _ods_context = _ods_get_default_loc_context(loc)
    results = []
    _ods_successors = None
    super().__init__(self.OPERATION_NAME, self._ODS_REGIONS, self._ODS_OPERAND_SEGMENTS, self._ODS_RESULT_SEGMENTS, attributes=attributes, results=results, operands=operands, successors=_ods_successors, regions=regions, loc=loc, ip=ip)

@_ods_cext.register_op_adaptor(ApplyVectorContractBF16ToFMAPatternsOp)
class ApplyVectorContractBF16ToFMAPatternsOpAdaptor(_ods_ir.OpAdaptor):
  OPERATION_NAME = "transform.apply_patterns.x86.vector_contract_bf16_to_fma"

def apply_patterns_x86_vector_contract_bf16_to_fma(*, loc: _Optional[_ods_ir.Location] = None, ip: _Optional[_ods_ir.InsertionPoint] = None) -> ApplyVectorContractBF16ToFMAPatternsOp:
  return ApplyVectorContractBF16ToFMAPatternsOp(loc=loc, ip=ip)

@_ods_cext.register_operation(_Dialect)
class ApplyVectorContractToAMXDotProductPatternsOp(_ods_ir.OpView):
  r"""
     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)

  def __init__(self, *, loc: _Optional[_ods_ir.Location] = None, ip: _Optional[_ods_ir.InsertionPoint] = None):
    operands = []
    attributes = {}
    regions = None
    _ods_context = _ods_get_default_loc_context(loc)
    results = []
    _ods_successors = None
    super().__init__(self.OPERATION_NAME, self._ODS_REGIONS, self._ODS_OPERAND_SEGMENTS, self._ODS_RESULT_SEGMENTS, attributes=attributes, results=results, operands=operands, successors=_ods_successors, regions=regions, loc=loc, ip=ip)

@_ods_cext.register_op_adaptor(ApplyVectorContractToAMXDotProductPatternsOp)
class ApplyVectorContractToAMXDotProductPatternsOpAdaptor(_ods_ir.OpAdaptor):
  OPERATION_NAME = "transform.apply_patterns.x86.vector_contract_to_amx_dot_product"

def apply_patterns_x86_vector_contract_to_amx_dot_product(*, loc: _Optional[_ods_ir.Location] = None, ip: _Optional[_ods_ir.InsertionPoint] = None) -> ApplyVectorContractToAMXDotProductPatternsOp:
  return ApplyVectorContractToAMXDotProductPatternsOp(loc=loc, ip=ip)

@_ods_cext.register_operation(_Dialect)
class ApplyVectorContractToFMAPatternsOp(_ods_ir.OpView):
  r"""
  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)

  def __init__(self, *, loc: _Optional[_ods_ir.Location] = None, ip: _Optional[_ods_ir.InsertionPoint] = None):
    operands = []
    attributes = {}
    regions = None
    _ods_context = _ods_get_default_loc_context(loc)
    results = []
    _ods_successors = None
    super().__init__(self.OPERATION_NAME, self._ODS_REGIONS, self._ODS_OPERAND_SEGMENTS, self._ODS_RESULT_SEGMENTS, attributes=attributes, results=results, operands=operands, successors=_ods_successors, regions=regions, loc=loc, ip=ip)

@_ods_cext.register_op_adaptor(ApplyVectorContractToFMAPatternsOp)
class ApplyVectorContractToFMAPatternsOpAdaptor(_ods_ir.OpAdaptor):
  OPERATION_NAME = "transform.apply_patterns.x86.vector_contract_to_fma"

def apply_patterns_x86_vector_contract_to_fma(*, loc: _Optional[_ods_ir.Location] = None, ip: _Optional[_ods_ir.InsertionPoint] = None) -> ApplyVectorContractToFMAPatternsOp:
  return ApplyVectorContractToFMAPatternsOp(loc=loc, ip=ip)

@_ods_cext.register_operation(_Dialect)
class ApplyVectorContractToPackedTypeDotProductPatternsOp(_ods_ir.OpView):
  r"""
     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)

  def __init__(self, *, loc: _Optional[_ods_ir.Location] = None, ip: _Optional[_ods_ir.InsertionPoint] = None):
    operands = []
    attributes = {}
    regions = None
    _ods_context = _ods_get_default_loc_context(loc)
    results = []
    _ods_successors = None
    super().__init__(self.OPERATION_NAME, self._ODS_REGIONS, self._ODS_OPERAND_SEGMENTS, self._ODS_RESULT_SEGMENTS, attributes=attributes, results=results, operands=operands, successors=_ods_successors, regions=regions, loc=loc, ip=ip)

@_ods_cext.register_op_adaptor(ApplyVectorContractToPackedTypeDotProductPatternsOp)
class ApplyVectorContractToPackedTypeDotProductPatternsOpAdaptor(_ods_ir.OpAdaptor):
  OPERATION_NAME = "transform.apply_patterns.x86.vector_contract_to_packed_type_dot_product"

def apply_patterns_x86_vector_contract_to_packed_type_dot_product(*, loc: _Optional[_ods_ir.Location] = None, ip: _Optional[_ods_ir.InsertionPoint] = None) -> ApplyVectorContractToPackedTypeDotProductPatternsOp:
  return ApplyVectorContractToPackedTypeDotProductPatternsOp(loc=loc, ip=ip)
