/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|*                                                                            *|
|* Op Definitions                                                             *|
|*                                                                            *|
|* Automatically generated file, do not edit!                                 *|
|* From: ROCDLOps.td                                                          *|
|*                                                                            *|
\*===----------------------------------------------------------------------===*/

#ifdef GET_OP_LIST
#undef GET_OP_LIST

::mlir::ROCDL::BallotOp,
::mlir::ROCDL::BarrierInitOp,
::mlir::ROCDL::BarrierJoinOp,
::mlir::ROCDL::BarrierLeaveOp,
::mlir::ROCDL::BarrierOp,
::mlir::ROCDL::BarrierSignalIsfirstOp,
::mlir::ROCDL::BarrierSignalOp,
::mlir::ROCDL::BarrierSignalVarOp,
::mlir::ROCDL::BarrierWaitOp,
::mlir::ROCDL::BlockDimXOp,
::mlir::ROCDL::BlockDimYOp,
::mlir::ROCDL::BlockDimZOp,
::mlir::ROCDL::BlockIdXOp,
::mlir::ROCDL::BlockIdYOp,
::mlir::ROCDL::BlockIdZOp,
::mlir::ROCDL::ClusterIdXOp,
::mlir::ROCDL::ClusterIdYOp,
::mlir::ROCDL::ClusterIdZOp,
::mlir::ROCDL::CvtF32Bf8Op,
::mlir::ROCDL::CvtF32Fp8Op,
::mlir::ROCDL::CvtPkBf8F32Op,
::mlir::ROCDL::CvtPkF32Bf8Op,
::mlir::ROCDL::CvtPkF32Fp8Op,
::mlir::ROCDL::CvtPkFp8F32Op,
::mlir::ROCDL::CvtPkRtz,
::mlir::ROCDL::CvtPkScalePk16Bf16Bf6Op,
::mlir::ROCDL::CvtPkScalePk16Bf16Fp6Op,
::mlir::ROCDL::CvtPkScalePk16F16Bf6Op,
::mlir::ROCDL::CvtPkScalePk16F16Fp6Op,
::mlir::ROCDL::CvtPkScalePk16F32Bf6Op,
::mlir::ROCDL::CvtPkScalePk16F32Fp6Op,
::mlir::ROCDL::CvtPkScalePk8Bf16Bf8Op,
::mlir::ROCDL::CvtPkScalePk8Bf16Fp4Op,
::mlir::ROCDL::CvtPkScalePk8Bf16Fp8Op,
::mlir::ROCDL::CvtPkScalePk8F16Bf8Op,
::mlir::ROCDL::CvtPkScalePk8F16Fp4Op,
::mlir::ROCDL::CvtPkScalePk8F16Fp8Op,
::mlir::ROCDL::CvtPkScalePk8F32Bf8Op,
::mlir::ROCDL::CvtPkScalePk8F32Fp4Op,
::mlir::ROCDL::CvtPkScalePk8F32Fp8Op,
::mlir::ROCDL::CvtScaleF322xPk16Bf6F32Op,
::mlir::ROCDL::CvtScaleF322xPk16Fp6F32Op,
::mlir::ROCDL::CvtScaleF32F16Bf8Op,
::mlir::ROCDL::CvtScaleF32F16Fp8Op,
::mlir::ROCDL::CvtScaleF32F32Bf8Op,
::mlir::ROCDL::CvtScaleF32F32Fp8Op,
::mlir::ROCDL::CvtScaleF32Pk16Bf6Bf16Op,
::mlir::ROCDL::CvtScaleF32Pk16Bf6F16Op,
::mlir::ROCDL::CvtScaleF32Pk16Bf6F32Op,
::mlir::ROCDL::CvtScaleF32Pk16Fp6Bf16Op,
::mlir::ROCDL::CvtScaleF32Pk16Fp6F16Op,
::mlir::ROCDL::CvtScaleF32Pk16Fp6F32Op,
::mlir::ROCDL::CvtScaleF32Pk32Bf16Bf6Op,
::mlir::ROCDL::CvtScaleF32Pk32Bf16Fp6Op,
::mlir::ROCDL::CvtScaleF32Pk32Bf6Bf16Op,
::mlir::ROCDL::CvtScaleF32Pk32Bf6F16Op,
::mlir::ROCDL::CvtScaleF32Pk32F16Bf6Op,
::mlir::ROCDL::CvtScaleF32Pk32F16Fp6Op,
::mlir::ROCDL::CvtScaleF32Pk32F32Bf6Op,
::mlir::ROCDL::CvtScaleF32Pk32F32Fp6Op,
::mlir::ROCDL::CvtScaleF32Pk32Fp6Bf16Op,
::mlir::ROCDL::CvtScaleF32Pk32Fp6F16Op,
::mlir::ROCDL::CvtScaleF32Pk8Bf8Bf16Op,
::mlir::ROCDL::CvtScaleF32Pk8Bf8F16Op,
::mlir::ROCDL::CvtScaleF32Pk8Bf8F32Op,
::mlir::ROCDL::CvtScaleF32Pk8Fp4Bf16Op,
::mlir::ROCDL::CvtScaleF32Pk8Fp4F16Op,
::mlir::ROCDL::CvtScaleF32Pk8Fp4F32Op,
::mlir::ROCDL::CvtScaleF32Pk8Fp8Bf16Op,
::mlir::ROCDL::CvtScaleF32Pk8Fp8F16Op,
::mlir::ROCDL::CvtScaleF32Pk8Fp8F32Op,
::mlir::ROCDL::CvtScaleF32PkBf16Bf8Op,
::mlir::ROCDL::CvtScaleF32PkBf16Fp4Op,
::mlir::ROCDL::CvtScaleF32PkBf16Fp8Op,
::mlir::ROCDL::CvtScaleF32PkBf8Bf16Op,
::mlir::ROCDL::CvtScaleF32PkBf8F16Op,
::mlir::ROCDL::CvtScaleF32PkBf8F32Op,
::mlir::ROCDL::CvtScaleF32PkF16Bf8Op,
::mlir::ROCDL::CvtScaleF32PkF16Fp4Op,
::mlir::ROCDL::CvtScaleF32PkF16Fp8Op,
::mlir::ROCDL::CvtScaleF32PkF32Bf8Op,
::mlir::ROCDL::CvtScaleF32PkF32Fp4Op,
::mlir::ROCDL::CvtScaleF32PkF32Fp8Op,
::mlir::ROCDL::CvtScaleF32PkFp4Bf16Op,
::mlir::ROCDL::CvtScaleF32PkFp4F16Op,
::mlir::ROCDL::CvtScaleF32PkFp4F32Op,
::mlir::ROCDL::CvtScaleF32PkFp8Bf16Op,
::mlir::ROCDL::CvtScaleF32PkFp8F16Op,
::mlir::ROCDL::CvtScaleF32PkFp8F32Op,
::mlir::ROCDL::CvtScaleF32SrBf8BF16Op,
::mlir::ROCDL::CvtScaleF32SrBf8F16Op,
::mlir::ROCDL::CvtScaleF32SrBf8F32Op,
::mlir::ROCDL::CvtScaleF32SrFp8BF16Op,
::mlir::ROCDL::CvtScaleF32SrFp8F16Op,
::mlir::ROCDL::CvtScaleF32SrFp8F32Op,
::mlir::ROCDL::CvtScaleF32SrPk16Bf6Bf16Op,
::mlir::ROCDL::CvtScaleF32SrPk16Bf6F16Op,
::mlir::ROCDL::CvtScaleF32SrPk16Bf6F32Op,
::mlir::ROCDL::CvtScaleF32SrPk16Fp6Bf16Op,
::mlir::ROCDL::CvtScaleF32SrPk16Fp6F16Op,
::mlir::ROCDL::CvtScaleF32SrPk16Fp6F32Op,
::mlir::ROCDL::CvtScaleF32SrPk32Bf6Bf16Op,
::mlir::ROCDL::CvtScaleF32SrPk32Bf6F16Op,
::mlir::ROCDL::CvtScaleF32SrPk32Bf6F32Op,
::mlir::ROCDL::CvtScaleF32SrPk32Fp6Bf16Op,
::mlir::ROCDL::CvtScaleF32SrPk32Fp6F16Op,
::mlir::ROCDL::CvtScaleF32SrPk32Fp6F32Op,
::mlir::ROCDL::CvtScaleF32SrPk8Bf8Bf16Op,
::mlir::ROCDL::CvtScaleF32SrPk8Bf8F16Op,
::mlir::ROCDL::CvtScaleF32SrPk8Bf8F32Op,
::mlir::ROCDL::CvtScaleF32SrPk8Fp4Bf16Op,
::mlir::ROCDL::CvtScaleF32SrPk8Fp4F16Op,
::mlir::ROCDL::CvtScaleF32SrPk8Fp4F32Op,
::mlir::ROCDL::CvtScaleF32SrPk8Fp8Bf16Op,
::mlir::ROCDL::CvtScaleF32SrPk8Fp8F16Op,
::mlir::ROCDL::CvtScaleF32SrPk8Fp8F32Op,
::mlir::ROCDL::CvtScaleF32SrPkFp4Bf16Op,
::mlir::ROCDL::CvtScaleF32SrPkFp4F16Op,
::mlir::ROCDL::CvtScaleF32SrPkFp4F32Op,
::mlir::ROCDL::CvtSrBf8F32Op,
::mlir::ROCDL::CvtSrFp8F32Op,
::mlir::ROCDL::DPPUpdateOp,
::mlir::ROCDL::DsBpermuteOp,
::mlir::ROCDL::DsLoadTr16_B128,
::mlir::ROCDL::DsLoadTr4_B64,
::mlir::ROCDL::DsLoadTr6_B96,
::mlir::ROCDL::DsLoadTr8_B64,
::mlir::ROCDL::DsSwizzleOp,
::mlir::ROCDL::FMed3Op,
::mlir::ROCDL::GetBarrierStateOp,
::mlir::ROCDL::GetNamedBarrierStateOp,
::mlir::ROCDL::GlobalLoadAsyncToLDSB128Op,
::mlir::ROCDL::GlobalLoadAsyncToLDSB32Op,
::mlir::ROCDL::GlobalLoadAsyncToLDSB64Op,
::mlir::ROCDL::GlobalLoadAsyncToLDSB8Op,
::mlir::ROCDL::GlobalLoadLDSOp,
::mlir::ROCDL::GlobalLoadTr4_B64,
::mlir::ROCDL::GlobalLoadTr6_B96,
::mlir::ROCDL::GlobalLoadTr8_B128,
::mlir::ROCDL::GlobalLoadTr8_B64,
::mlir::ROCDL::GridDimXOp,
::mlir::ROCDL::GridDimYOp,
::mlir::ROCDL::GridDimZOp,
::mlir::ROCDL::IglpOpt,
::mlir::ROCDL::LoadToLDSOp,
::mlir::ROCDL::MakeBufferRsrcOp,
::mlir::ROCDL::MbcntHiOp,
::mlir::ROCDL::MbcntLoOp,
::mlir::ROCDL::Permlane16SwapOp,
::mlir::ROCDL::Permlane32SwapOp,
::mlir::ROCDL::PermlaneX16Op,
::mlir::ROCDL::RawBufferAtomicCmpSwap,
::mlir::ROCDL::RawBufferAtomicFAddOp,
::mlir::ROCDL::RawBufferAtomicFMaxOp,
::mlir::ROCDL::RawBufferAtomicSMaxOp,
::mlir::ROCDL::RawBufferAtomicUMinOp,
::mlir::ROCDL::RawBufferLoadOp,
::mlir::ROCDL::RawBufferStoreOp,
::mlir::ROCDL::RawPtrBufferAtomicCmpSwap,
::mlir::ROCDL::RawPtrBufferAtomicFaddOp,
::mlir::ROCDL::RawPtrBufferAtomicFmaxOp,
::mlir::ROCDL::RawPtrBufferAtomicSmaxOp,
::mlir::ROCDL::RawPtrBufferAtomicUminOp,
::mlir::ROCDL::RawPtrBufferLoadLdsOp,
::mlir::ROCDL::RawPtrBufferLoadOp,
::mlir::ROCDL::RawPtrBufferStoreOp,
::mlir::ROCDL::ReadfirstlaneOp,
::mlir::ROCDL::ReadlaneOp,
::mlir::ROCDL::SBarrierOp,
::mlir::ROCDL::SSleepOp,
::mlir::ROCDL::SWaitcntOp,
::mlir::ROCDL::SchedBarrier,
::mlir::ROCDL::SchedGroupBarrier,
::mlir::ROCDL::SetPrioOp,
::mlir::ROCDL::TensorLoadToLDSD2Op,
::mlir::ROCDL::TensorLoadToLDSOp,
::mlir::ROCDL::TensorStoreFromLDSD2Op,
::mlir::ROCDL::TensorStoreFromLDSOp,
::mlir::ROCDL::ThreadIdXOp,
::mlir::ROCDL::ThreadIdYOp,
::mlir::ROCDL::ThreadIdZOp,
::mlir::ROCDL::WaitAsynccntOp,
::mlir::ROCDL::WaitDscntOp,
::mlir::ROCDL::WaitExpcntOp,
::mlir::ROCDL::WaitLoadcntOp,
::mlir::ROCDL::WaitStorecntOp,
::mlir::ROCDL::WaitTensorcntOp,
::mlir::ROCDL::WavefrontSizeOp,
::mlir::ROCDL::ds_read_tr16_b64,
::mlir::ROCDL::ds_read_tr4_b64,
::mlir::ROCDL::ds_read_tr6_b96,
::mlir::ROCDL::ds_read_tr8_b64,
::mlir::ROCDL::mfma_f32_16x16x16bf16_1k,
::mlir::ROCDL::mfma_f32_16x16x16f16,
::mlir::ROCDL::mfma_f32_16x16x1f32,
::mlir::ROCDL::mfma_f32_16x16x2bf16,
::mlir::ROCDL::mfma_f32_16x16x32_bf16,
::mlir::ROCDL::mfma_f32_16x16x32_bf8_bf8,
::mlir::ROCDL::mfma_f32_16x16x32_bf8_fp8,
::mlir::ROCDL::mfma_f32_16x16x32_f16,
::mlir::ROCDL::mfma_f32_16x16x32_fp8_bf8,
::mlir::ROCDL::mfma_f32_16x16x32_fp8_fp8,
::mlir::ROCDL::mfma_f32_16x16x4bf16_1k,
::mlir::ROCDL::mfma_f32_16x16x4f16,
::mlir::ROCDL::mfma_f32_16x16x4f32,
::mlir::ROCDL::mfma_f32_16x16x8_xf32,
::mlir::ROCDL::mfma_f32_16x16x8bf16,
::mlir::ROCDL::mfma_f32_32x32x16_bf16,
::mlir::ROCDL::mfma_f32_32x32x16_bf8_bf8,
::mlir::ROCDL::mfma_f32_32x32x16_bf8_fp8,
::mlir::ROCDL::mfma_f32_32x32x16_f16,
::mlir::ROCDL::mfma_f32_32x32x16_fp8_bf8,
::mlir::ROCDL::mfma_f32_32x32x16_fp8_fp8,
::mlir::ROCDL::mfma_f32_32x32x1f32,
::mlir::ROCDL::mfma_f32_32x32x2bf16,
::mlir::ROCDL::mfma_f32_32x32x2f32,
::mlir::ROCDL::mfma_f32_32x32x4_xf32,
::mlir::ROCDL::mfma_f32_32x32x4bf16,
::mlir::ROCDL::mfma_f32_32x32x4bf16_1k,
::mlir::ROCDL::mfma_f32_32x32x4f16,
::mlir::ROCDL::mfma_f32_32x32x8bf16_1k,
::mlir::ROCDL::mfma_f32_32x32x8f16,
::mlir::ROCDL::mfma_f32_4x4x1f32,
::mlir::ROCDL::mfma_f32_4x4x2bf16,
::mlir::ROCDL::mfma_f32_4x4x4bf16_1k,
::mlir::ROCDL::mfma_f32_4x4x4f16,
::mlir::ROCDL::mfma_f64_16x16x4f64,
::mlir::ROCDL::mfma_f64_4x4x4f64,
::mlir::ROCDL::mfma_i32_16x16x16i8,
::mlir::ROCDL::mfma_i32_16x16x32_i8,
::mlir::ROCDL::mfma_i32_16x16x4i8,
::mlir::ROCDL::mfma_i32_16x16x64_i8,
::mlir::ROCDL::mfma_i32_32x32x16_i8,
::mlir::ROCDL::mfma_i32_32x32x32_i8,
::mlir::ROCDL::mfma_i32_32x32x4i8,
::mlir::ROCDL::mfma_i32_32x32x8i8,
::mlir::ROCDL::mfma_i32_4x4x4i8,
::mlir::ROCDL::mfma_scale_f32_16x16x128_f8f6f4,
::mlir::ROCDL::mfma_scale_f32_32x32x64_f8f6f4,
::mlir::ROCDL::smfmac_f32_16x16x32_bf16,
::mlir::ROCDL::smfmac_f32_16x16x32_f16,
::mlir::ROCDL::smfmac_f32_16x16x64_bf8_bf8,
::mlir::ROCDL::smfmac_f32_16x16x64_bf8_fp8,
::mlir::ROCDL::smfmac_f32_16x16x64_fp8_bf8,
::mlir::ROCDL::smfmac_f32_16x16x64_fp8_fp8,
::mlir::ROCDL::smfmac_f32_32x32x16_bf16,
::mlir::ROCDL::smfmac_f32_32x32x16_f16,
::mlir::ROCDL::smfmac_f32_32x32x32_bf8_bf8,
::mlir::ROCDL::smfmac_f32_32x32x32_bf8_fp8,
::mlir::ROCDL::smfmac_f32_32x32x32_fp8_bf8,
::mlir::ROCDL::smfmac_f32_32x32x32_fp8_fp8,
::mlir::ROCDL::smfmac_i32_16x16x64_i8,
::mlir::ROCDL::smfmac_i32_32x32x32_i8,
::mlir::ROCDL::wmma_bf16_16x16x16_bf16,
::mlir::ROCDL::wmma_bf16_16x16x32_bf16,
::mlir::ROCDL::wmma_bf16f32_16x16x32_bf16,
::mlir::ROCDL::wmma_f16_16x16x128_bf8_bf8,
::mlir::ROCDL::wmma_f16_16x16x128_bf8_fp8,
::mlir::ROCDL::wmma_f16_16x16x128_fp8_bf8,
::mlir::ROCDL::wmma_f16_16x16x128_fp8_fp8,
::mlir::ROCDL::wmma_f16_16x16x16_f16,
::mlir::ROCDL::wmma_f16_16x16x32_f16,
::mlir::ROCDL::wmma_f16_16x16x64_bf8_bf8,
::mlir::ROCDL::wmma_f16_16x16x64_bf8_fp8,
::mlir::ROCDL::wmma_f16_16x16x64_fp8_bf8,
::mlir::ROCDL::wmma_f16_16x16x64_fp8_fp8,
::mlir::ROCDL::wmma_f32_16x16x128_bf8_bf8,
::mlir::ROCDL::wmma_f32_16x16x128_bf8_fp8,
::mlir::ROCDL::wmma_f32_16x16x128_fp8_bf8,
::mlir::ROCDL::wmma_f32_16x16x128_fp8_fp8,
::mlir::ROCDL::wmma_f32_16x16x16_bf16,
::mlir::ROCDL::wmma_f32_16x16x16_bf8_bf8,
::mlir::ROCDL::wmma_f32_16x16x16_bf8_fp8,
::mlir::ROCDL::wmma_f32_16x16x16_f16,
::mlir::ROCDL::wmma_f32_16x16x16_fp8_bf8,
::mlir::ROCDL::wmma_f32_16x16x16_fp8_fp8,
::mlir::ROCDL::wmma_f32_16x16x32_bf16,
::mlir::ROCDL::wmma_f32_16x16x32_f16,
::mlir::ROCDL::wmma_f32_16x16x4_f32,
::mlir::ROCDL::wmma_f32_16x16x64_bf8_bf8,
::mlir::ROCDL::wmma_f32_16x16x64_bf8_fp8,
::mlir::ROCDL::wmma_f32_16x16x64_fp8_bf8,
::mlir::ROCDL::wmma_f32_16x16x64_fp8_fp8,
::mlir::ROCDL::wmma_i32_16x16x16_iu4,
::mlir::ROCDL::wmma_i32_16x16x16_iu8,
::mlir::ROCDL::wmma_i32_16x16x32_iu4,
::mlir::ROCDL::wmma_i32_16x16x64_iu8,
::mlir::ROCDL::wmma_scale16_f32_16x16x128_f8f6f4,
::mlir::ROCDL::wmma_scale16_f32_32x16x128_f4,
::mlir::ROCDL::wmma_scale_f32_16x16x128_f8f6f4,
::mlir::ROCDL::wmma_scale_f32_32x16x128_f4
#endif // GET_OP_LIST

#ifdef GET_OP_CLASSES
#undef GET_OP_CLASSES


//===----------------------------------------------------------------------===//
// Local Utility Method Definitions
//===----------------------------------------------------------------------===//


static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps1(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((type.isSignlessInteger(1)))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be 1-bit signless integer, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps2(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((::mlir::LLVM::isCompatibleOuterType(type)))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be LLVM dialect-compatible type, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps3(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!(((::llvm::isa<::mlir::LLVM::LLVMPointerType>(type))) && ((::llvm::cast<::mlir::LLVM::LLVMPointerType>(type).getAddressSpace() == 3)))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be LLVM pointer in address space 3, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps4(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((type.isSignlessInteger(32)))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be 32-bit signless integer, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps5(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((type.isF32()))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be 32-bit float, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps6(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (elementType.isSignlessInteger(32)); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 3))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of 32-bit signless integer values of length 3, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps7(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (::llvm::isa<::mlir::BFloat16Type>(elementType)); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 16))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of bfloat16 type values of length 16, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps8(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (elementType.isF16()); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 16))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of 16-bit float values of length 16, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps9(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (elementType.isF32()); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 16))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of 32-bit float values of length 16, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps10(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (elementType.isSignlessInteger(32)); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 2))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of 32-bit signless integer values of length 2, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps11(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (::llvm::isa<::mlir::BFloat16Type>(elementType)); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 8))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of bfloat16 type values of length 8, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps12(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (elementType.isF16()); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 8))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of 16-bit float values of length 8, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps13(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (elementType.isF32()); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 8))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of 32-bit float values of length 8, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps14(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (elementType.isSignlessInteger(32)); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 6))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of 32-bit signless integer values of length 6, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps15(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (elementType.isF16()); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 2))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of 16-bit float values of length 2, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps16(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (::llvm::isa<::mlir::BFloat16Type>(elementType)); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 32))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of bfloat16 type values of length 32, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps17(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (elementType.isF16()); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 32))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of 16-bit float values of length 32, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps18(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (elementType.isF32()); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 32))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of 32-bit float values of length 32, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps19(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (::llvm::isa<::mlir::BFloat16Type>(elementType)); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 2))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of bfloat16 type values of length 2, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps20(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (elementType.isSignlessInteger(16)); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 2))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of 16-bit signless integer values of length 2, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps21(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (elementType.isF32()); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 2))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of 32-bit float values of length 2, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps22(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((::llvm::isa<::mlir::BFloat16Type>(type)))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be bfloat16 type, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps23(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((type.isF16()))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be 16-bit float, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps24(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!(((::mlir::LLVM::isCompatibleFloatingPointType(type))) || (((::mlir::LLVM::isCompatibleVectorType(type))) && ((::mlir::LLVM::isCompatibleFloatingPointType(::llvm::cast<::mlir::VectorType>(type).getElementType())))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be floating point LLVM type or LLVM dialect-compatible vector of floating point LLVM type, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps25(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!(((::llvm::isa<::mlir::LLVM::LLVMPointerType>(type))) && ((::llvm::cast<::mlir::LLVM::LLVMPointerType>(type).getAddressSpace() == 1)))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be LLVM pointer in address space 1, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps26(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((::llvm::isa<::mlir::LLVM::LLVMPointerType>(type)))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be LLVM pointer type, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps27(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((type.isSignlessInteger(16)))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be 16-bit signless integer, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps28(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((type.isSignlessInteger(64)))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be 64-bit signless integer, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps29(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!(((::llvm::isa<::mlir::LLVM::LLVMStructType>(type))) && ((::llvm::cast<::mlir::LLVM::LLVMStructType>(type).getBody()[0].isSignlessInteger(32))) && ((::llvm::cast<::mlir::LLVM::LLVMStructType>(type).getBody()[1].isSignlessInteger(32))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be LLVM dialect-compatible struct of 32-bit signless integerand32-bit signless integer, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps30(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!(((::llvm::isa<::mlir::LLVM::LLVMPointerType>(type))) && ((::llvm::cast<::mlir::LLVM::LLVMPointerType>(type).getAddressSpace() == 8)))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be LLVM pointer in address space 8, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps31(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (elementType.isSignlessInteger(32)); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 4))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of 32-bit signless integer values of length 4, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps32(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((((::llvm::isa<::mlir::FixedVectorType>(type))) && ([](::mlir::Type elementType) { return (elementType.isSignlessInteger(32)); }(::llvm::cast<::mlir::ShapedType>(type).getElementType()))) && (((::llvm::isa<::mlir::FixedVectorType>(type))) && ((::llvm::cast<::mlir::VectorType>(type).getNumElements()
                           == 8))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be fixed-length vector of 32-bit signless integer values of length 8, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps33(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!((::mlir::LLVM::isCompatibleOuterType(type)))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be variadic of LLVM dialect-compatible type, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps34(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!(((::llvm::isa<::mlir::IntegerType>(type))) || (((::mlir::LLVM::isCompatibleVectorType(type))) && ((::llvm::isa<::mlir::IntegerType>(::llvm::cast<::mlir::VectorType>(type).getElementType())))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be integer or LLVM dialect-compatible vector of integer, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps35(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!(((::llvm::isa<::mlir::BFloat16Type>(type))) || (((::mlir::LLVM::isCompatibleVectorType(type))) && ((::llvm::isa<::mlir::BFloat16Type>(::llvm::cast<::mlir::VectorType>(type).getElementType())))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be bfloat16 type or LLVM dialect-compatible vector of bfloat16 type, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps36(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!(((type.isF32())) || (((::mlir::LLVM::isCompatibleVectorType(type))) && ((::llvm::cast<::mlir::VectorType>(type).getElementType().isF32()))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be 32-bit float or LLVM dialect-compatible vector of 32-bit float, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ROCDLOps37(
    ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
    unsigned valueIndex) {
  if (!(((type.isF16())) || (((::mlir::LLVM::isCompatibleVectorType(type))) && ((::llvm::cast<::mlir::VectorType>(type).getElementType().isF16()))))) {
    return op->emitOpError(valueKind) << " #" << valueIndex
        << " must be 16-bit float or LLVM dialect-compatible vector of 16-bit float, but got " << type;
  }
  return ::mlir::success();
}

static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ROCDLOps1(
    ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  if (attr && !(((::llvm::isa<::mlir::IntegerAttr>(attr))) && ((::llvm::cast<::mlir::IntegerAttr>(attr).getType().isSignlessInteger(32)))))
    return emitError() << "attribute '" << attrName
        << "' failed to satisfy constraint: 32-bit signless integer attribute";
  return ::mlir::success();
}
static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ROCDLOps1(
    ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
  return __mlir_ods_local_attr_constraint_ROCDLOps1(attr, attrName, [op]() {
    return op->emitOpError();
  });
}

static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ROCDLOps2(
    ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  if (attr && !(((::llvm::isa<::mlir::IntegerAttr>(attr))) && ((::llvm::cast<::mlir::IntegerAttr>(attr).getType().isSignlessInteger(16)))))
    return emitError() << "attribute '" << attrName
        << "' failed to satisfy constraint: 16-bit signless integer attribute";
  return ::mlir::success();
}
static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ROCDLOps2(
    ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
  return __mlir_ods_local_attr_constraint_ROCDLOps2(attr, attrName, [op]() {
    return op->emitOpError();
  });
}

static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ROCDLOps3(
    ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  if (attr && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(attr))))
    return emitError() << "attribute '" << attrName
        << "' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange";
  return ::mlir::success();
}
static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ROCDLOps3(
    ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
  return __mlir_ods_local_attr_constraint_ROCDLOps3(attr, attrName, [op]() {
    return op->emitOpError();
  });
}

static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ROCDLOps4(
    ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  if (attr && !(((::llvm::isa<::mlir::IntegerAttr>(attr))) && ((::llvm::cast<::mlir::IntegerAttr>(attr).getType().isSignlessInteger(1)))))
    return emitError() << "attribute '" << attrName
        << "' failed to satisfy constraint: 1-bit signless integer attribute";
  return ::mlir::success();
}
static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ROCDLOps4(
    ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
  return __mlir_ods_local_attr_constraint_ROCDLOps4(attr, attrName, [op]() {
    return op->emitOpError();
  });
}

static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ROCDLOps5(
    ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(attr))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(attr), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError() << "attribute '" << attrName
        << "' failed to satisfy constraint: LLVM dialect alias scope array";
  return ::mlir::success();
}
static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ROCDLOps5(
    ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
  return __mlir_ods_local_attr_constraint_ROCDLOps5(attr, attrName, [op]() {
    return op->emitOpError();
  });
}

static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ROCDLOps6(
    ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(attr))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(attr), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError() << "attribute '" << attrName
        << "' failed to satisfy constraint: LLVM dialect TBAA tag metadata array";
  return ::mlir::success();
}
static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ROCDLOps6(
    ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
  return __mlir_ods_local_attr_constraint_ROCDLOps6(attr, attrName, [op]() {
    return op->emitOpError();
  });
}

static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ROCDLOps7(
    ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(attr))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(attr), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
    return emitError() << "attribute '" << attrName
        << "' failed to satisfy constraint: Array of dictionary attributes";
  return ::mlir::success();
}
static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ROCDLOps7(
    ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
  return __mlir_ods_local_attr_constraint_ROCDLOps7(attr, attrName, [op]() {
    return op->emitOpError();
  });
}
namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BallotOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BallotOpGenericAdaptorBase::BallotOpGenericAdaptorBase(BallotOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
BallotOpAdaptor::BallotOpAdaptor(BallotOp op) : BallotOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BallotOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult BallotOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute BallotOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BallotOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> BallotOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void BallotOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void BallotOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult BallotOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void BallotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value pred) {
  odsState.addOperands(pred);
  odsState.addTypes(res);
}

BallotOp BallotOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value pred) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, pred);
  auto __res__ = ::llvm::dyn_cast<BallotOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BallotOp BallotOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value pred) {
  return create(builder, builder.getLoc(), res, pred);
}

void BallotOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pred) {
  odsState.addOperands(pred);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BallotOp BallotOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value pred) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, pred);
  auto __res__ = ::llvm::dyn_cast<BallotOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BallotOp BallotOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value pred) {
  return create(builder, builder.getLoc(), resultTypes, pred);
}

void BallotOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BallotOp BallotOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BallotOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BallotOp BallotOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BallotOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BallotOp BallotOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BallotOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BallotOp BallotOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BallotOp::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps1(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult BallotOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BallotOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand predRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> predOperands(&predRawOperand, 1);  ::llvm::SMLoc predOperandsLoc;
  (void)predOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  predOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(predRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(1);
  result.addTypes(resTypes);
  if (parser.resolveOperands(predOperands, odsBuildableType0, predOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void BallotOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPred();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BallotOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BarrierInitOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BarrierInitOpGenericAdaptorBase::BarrierInitOpGenericAdaptorBase(BarrierInitOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t BarrierInitOpGenericAdaptorBase::getId() {
  auto attr = getIdAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
BarrierInitOpAdaptor::BarrierInitOpAdaptor(BarrierInitOp op) : BarrierInitOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BarrierInitOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_id = getProperties().id; (void)tblgen_id;
  if (!tblgen_id) return emitError(loc, "'rocdl.s.barrier.init' op requires attribute 'id'");

  if (tblgen_id && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_id))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_id).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.s.barrier.init' op attribute 'id' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult BarrierInitOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.id;
       auto attr = dict.get("id");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `id` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute BarrierInitOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.id;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("id",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BarrierInitOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.id.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> BarrierInitOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "id")
      return prop.id;
  return std::nullopt;
}

void BarrierInitOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "id") {
       prop.id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.id)>>(value);
       return;
    }
}

void BarrierInitOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.id) attrs.append("id", prop.id);
}

::llvm::LogicalResult BarrierInitOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getIdAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "id", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult BarrierInitOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.id)))
    return ::mlir::failure();
  return ::mlir::success();
}

void BarrierInitOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.id);
}

uint32_t BarrierInitOp::getId() {
  auto attr = getIdAttr();
  return attr.getValue().getZExtValue();
}

void BarrierInitOp::setId(uint32_t attrValue) {
  getProperties().id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void BarrierInitOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr, ::mlir::IntegerAttr id) {
  odsState.addOperands(ptr);
  odsState.getOrAddProperties<Properties>().id = id;
}

BarrierInitOp BarrierInitOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr, ::mlir::IntegerAttr id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, ptr, id);
  auto __res__ = ::llvm::dyn_cast<BarrierInitOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierInitOp BarrierInitOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr, ::mlir::IntegerAttr id) {
  return create(builder, builder.getLoc(), ptr, id);
}

void BarrierInitOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::IntegerAttr id) {
  odsState.addOperands(ptr);
  odsState.getOrAddProperties<Properties>().id = id;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BarrierInitOp BarrierInitOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::IntegerAttr id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, id);
  auto __res__ = ::llvm::dyn_cast<BarrierInitOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierInitOp BarrierInitOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::IntegerAttr id) {
  return create(builder, builder.getLoc(), resultTypes, ptr, id);
}

void BarrierInitOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr, uint32_t id) {
  odsState.addOperands(ptr);
  odsState.getOrAddProperties<Properties>().id = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), id);
}

BarrierInitOp BarrierInitOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr, uint32_t id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, ptr, id);
  auto __res__ = ::llvm::dyn_cast<BarrierInitOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierInitOp BarrierInitOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr, uint32_t id) {
  return create(builder, builder.getLoc(), ptr, id);
}

void BarrierInitOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, uint32_t id) {
  odsState.addOperands(ptr);
  odsState.getOrAddProperties<Properties>().id = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), id);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BarrierInitOp BarrierInitOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, uint32_t id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, id);
  auto __res__ = ::llvm::dyn_cast<BarrierInitOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierInitOp BarrierInitOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, uint32_t id) {
  return create(builder, builder.getLoc(), resultTypes, ptr, id);
}

void BarrierInitOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<BarrierInitOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

BarrierInitOp BarrierInitOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BarrierInitOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierInitOp BarrierInitOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BarrierInitOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BarrierInitOp BarrierInitOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BarrierInitOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierInitOp BarrierInitOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BarrierInitOp::verifyInvariantsImpl() {
  auto tblgen_id = getProperties().id; (void)tblgen_id;
  if (!tblgen_id) return emitOpError("requires attribute 'id'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_id, "id")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult BarrierInitOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BarrierInitOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::IntegerAttr idAttr;

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(idAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (idAttr) result.getOrAddProperties<BarrierInitOp::Properties>().id = idAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(3);
  if (parser.resolveOperands(ptrOperands, odsBuildableType0, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void BarrierInitOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getIdAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("id");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BarrierInitOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BarrierJoinOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BarrierJoinOpGenericAdaptorBase::BarrierJoinOpGenericAdaptorBase(BarrierJoinOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
BarrierJoinOpAdaptor::BarrierJoinOpAdaptor(BarrierJoinOp op) : BarrierJoinOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BarrierJoinOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult BarrierJoinOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute BarrierJoinOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BarrierJoinOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> BarrierJoinOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void BarrierJoinOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void BarrierJoinOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult BarrierJoinOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void BarrierJoinOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr) {
  odsState.addOperands(ptr);
}

BarrierJoinOp BarrierJoinOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, ptr);
  auto __res__ = ::llvm::dyn_cast<BarrierJoinOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierJoinOp BarrierJoinOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr) {
  return create(builder, builder.getLoc(), ptr);
}

void BarrierJoinOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr) {
  odsState.addOperands(ptr);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BarrierJoinOp BarrierJoinOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr);
  auto __res__ = ::llvm::dyn_cast<BarrierJoinOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierJoinOp BarrierJoinOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr) {
  return create(builder, builder.getLoc(), resultTypes, ptr);
}

void BarrierJoinOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BarrierJoinOp BarrierJoinOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BarrierJoinOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierJoinOp BarrierJoinOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BarrierJoinOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BarrierJoinOp BarrierJoinOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BarrierJoinOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierJoinOp BarrierJoinOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BarrierJoinOp::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult BarrierJoinOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BarrierJoinOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(3);
  if (parser.resolveOperands(ptrOperands, odsBuildableType0, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void BarrierJoinOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BarrierJoinOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BarrierLeaveOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BarrierLeaveOpGenericAdaptorBase::BarrierLeaveOpGenericAdaptorBase(BarrierLeaveOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint16_t BarrierLeaveOpGenericAdaptorBase::getId() {
  auto attr = getIdAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
BarrierLeaveOpAdaptor::BarrierLeaveOpAdaptor(BarrierLeaveOp op) : BarrierLeaveOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BarrierLeaveOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_id = getProperties().id; (void)tblgen_id;
  if (!tblgen_id) return emitError(loc, "'rocdl.s.barrier.leave' op requires attribute 'id'");

  if (tblgen_id && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_id))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_id).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.s.barrier.leave' op attribute 'id' failed to satisfy constraint: 16-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult BarrierLeaveOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.id;
       auto attr = dict.get("id");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `id` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute BarrierLeaveOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.id;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("id",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BarrierLeaveOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.id.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> BarrierLeaveOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "id")
      return prop.id;
  return std::nullopt;
}

void BarrierLeaveOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "id") {
       prop.id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.id)>>(value);
       return;
    }
}

void BarrierLeaveOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.id) attrs.append("id", prop.id);
}

::llvm::LogicalResult BarrierLeaveOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getIdAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "id", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult BarrierLeaveOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.id)))
    return ::mlir::failure();
  return ::mlir::success();
}

void BarrierLeaveOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.id);
}

uint16_t BarrierLeaveOp::getId() {
  auto attr = getIdAttr();
  return attr.getValue().getZExtValue();
}

void BarrierLeaveOp::setId(uint16_t attrValue) {
  getProperties().id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void BarrierLeaveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr id) {
  odsState.getOrAddProperties<Properties>().id = id;
}

BarrierLeaveOp BarrierLeaveOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, id);
  auto __res__ = ::llvm::dyn_cast<BarrierLeaveOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierLeaveOp BarrierLeaveOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr id) {
  return create(builder, builder.getLoc(), id);
}

void BarrierLeaveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  odsState.getOrAddProperties<Properties>().id = id;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BarrierLeaveOp BarrierLeaveOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, id);
  auto __res__ = ::llvm::dyn_cast<BarrierLeaveOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierLeaveOp BarrierLeaveOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  return create(builder, builder.getLoc(), resultTypes, id);
}

void BarrierLeaveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint16_t id) {
  odsState.getOrAddProperties<Properties>().id = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), id);
}

BarrierLeaveOp BarrierLeaveOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint16_t id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, id);
  auto __res__ = ::llvm::dyn_cast<BarrierLeaveOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierLeaveOp BarrierLeaveOp::create(::mlir::ImplicitLocOpBuilder &builder, uint16_t id) {
  return create(builder, builder.getLoc(), id);
}

void BarrierLeaveOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint16_t id) {
  odsState.getOrAddProperties<Properties>().id = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), id);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BarrierLeaveOp BarrierLeaveOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint16_t id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, id);
  auto __res__ = ::llvm::dyn_cast<BarrierLeaveOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierLeaveOp BarrierLeaveOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint16_t id) {
  return create(builder, builder.getLoc(), resultTypes, id);
}

void BarrierLeaveOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<BarrierLeaveOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

BarrierLeaveOp BarrierLeaveOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BarrierLeaveOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierLeaveOp BarrierLeaveOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BarrierLeaveOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BarrierLeaveOp BarrierLeaveOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BarrierLeaveOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierLeaveOp BarrierLeaveOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BarrierLeaveOp::verifyInvariantsImpl() {
  auto tblgen_id = getProperties().id; (void)tblgen_id;
  if (!tblgen_id) return emitOpError("requires attribute 'id'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_id, "id")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult BarrierLeaveOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BarrierLeaveOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr idAttr;

  if (parser.parseCustomAttributeWithFallback(idAttr, parser.getBuilder().getIntegerType(16))) {
    return ::mlir::failure();
  }
  if (idAttr) result.getOrAddProperties<BarrierLeaveOp::Properties>().id = idAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void BarrierLeaveOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getIdAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("id");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BarrierLeaveOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BarrierOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BarrierOpGenericAdaptorBase::BarrierOpGenericAdaptorBase(BarrierOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
BarrierOpAdaptor::BarrierOpAdaptor(BarrierOp op) : BarrierOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BarrierOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult BarrierOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute BarrierOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BarrierOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> BarrierOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void BarrierOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void BarrierOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult BarrierOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void BarrierOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

BarrierOp BarrierOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<BarrierOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierOp BarrierOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void BarrierOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BarrierOp BarrierOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes);
  auto __res__ = ::llvm::dyn_cast<BarrierOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierOp BarrierOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), resultTypes);
}

void BarrierOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BarrierOp BarrierOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BarrierOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierOp BarrierOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BarrierOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BarrierOp BarrierOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BarrierOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierOp BarrierOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BarrierOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult BarrierOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BarrierOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void BarrierOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BarrierOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BarrierSignalIsfirstOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BarrierSignalIsfirstOpGenericAdaptorBase::BarrierSignalIsfirstOpGenericAdaptorBase(BarrierSignalIsfirstOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t BarrierSignalIsfirstOpGenericAdaptorBase::getId() {
  auto attr = getIdAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
BarrierSignalIsfirstOpAdaptor::BarrierSignalIsfirstOpAdaptor(BarrierSignalIsfirstOp op) : BarrierSignalIsfirstOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BarrierSignalIsfirstOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_id = getProperties().id; (void)tblgen_id;
  if (!tblgen_id) return emitError(loc, "'rocdl.s.barrier.signal.isfirst' op requires attribute 'id'");

  if (tblgen_id && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_id))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_id).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.s.barrier.signal.isfirst' op attribute 'id' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult BarrierSignalIsfirstOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.id;
       auto attr = dict.get("id");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `id` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute BarrierSignalIsfirstOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.id;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("id",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BarrierSignalIsfirstOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.id.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> BarrierSignalIsfirstOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "id")
      return prop.id;
  return std::nullopt;
}

void BarrierSignalIsfirstOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "id") {
       prop.id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.id)>>(value);
       return;
    }
}

void BarrierSignalIsfirstOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.id) attrs.append("id", prop.id);
}

::llvm::LogicalResult BarrierSignalIsfirstOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getIdAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "id", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult BarrierSignalIsfirstOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.id)))
    return ::mlir::failure();
  return ::mlir::success();
}

void BarrierSignalIsfirstOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.id);
}

uint32_t BarrierSignalIsfirstOp::getId() {
  auto attr = getIdAttr();
  return attr.getValue().getZExtValue();
}

void BarrierSignalIsfirstOp::setId(uint32_t attrValue) {
  getProperties().id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void BarrierSignalIsfirstOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr id) {
  odsState.getOrAddProperties<Properties>().id = id;
  odsState.addTypes(res);
}

BarrierSignalIsfirstOp BarrierSignalIsfirstOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, id);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalIsfirstOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalIsfirstOp BarrierSignalIsfirstOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr id) {
  return create(builder, builder.getLoc(), res, id);
}

void BarrierSignalIsfirstOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  odsState.getOrAddProperties<Properties>().id = id;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BarrierSignalIsfirstOp BarrierSignalIsfirstOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, id);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalIsfirstOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalIsfirstOp BarrierSignalIsfirstOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  return create(builder, builder.getLoc(), resultTypes, id);
}

void BarrierSignalIsfirstOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, uint32_t id) {
  odsState.getOrAddProperties<Properties>().id = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), id);
  odsState.addTypes(res);
}

BarrierSignalIsfirstOp BarrierSignalIsfirstOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, uint32_t id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, id);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalIsfirstOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalIsfirstOp BarrierSignalIsfirstOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, uint32_t id) {
  return create(builder, builder.getLoc(), res, id);
}

void BarrierSignalIsfirstOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t id) {
  odsState.getOrAddProperties<Properties>().id = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), id);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BarrierSignalIsfirstOp BarrierSignalIsfirstOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, id);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalIsfirstOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalIsfirstOp BarrierSignalIsfirstOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t id) {
  return create(builder, builder.getLoc(), resultTypes, id);
}

void BarrierSignalIsfirstOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<BarrierSignalIsfirstOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

BarrierSignalIsfirstOp BarrierSignalIsfirstOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalIsfirstOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalIsfirstOp BarrierSignalIsfirstOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BarrierSignalIsfirstOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BarrierSignalIsfirstOp BarrierSignalIsfirstOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalIsfirstOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalIsfirstOp BarrierSignalIsfirstOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BarrierSignalIsfirstOp::verifyInvariantsImpl() {
  auto tblgen_id = getProperties().id; (void)tblgen_id;
  if (!tblgen_id) return emitOpError("requires attribute 'id'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_id, "id")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps1(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult BarrierSignalIsfirstOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BarrierSignalIsfirstOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr idAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  if (parser.parseCustomAttributeWithFallback(idAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (idAttr) result.getOrAddProperties<BarrierSignalIsfirstOp::Properties>().id = idAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void BarrierSignalIsfirstOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getIdAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("id");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BarrierSignalIsfirstOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BarrierSignalOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BarrierSignalOpGenericAdaptorBase::BarrierSignalOpGenericAdaptorBase(BarrierSignalOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t BarrierSignalOpGenericAdaptorBase::getId() {
  auto attr = getIdAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
BarrierSignalOpAdaptor::BarrierSignalOpAdaptor(BarrierSignalOp op) : BarrierSignalOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BarrierSignalOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_id = getProperties().id; (void)tblgen_id;
  if (!tblgen_id) return emitError(loc, "'rocdl.s.barrier.signal' op requires attribute 'id'");

  if (tblgen_id && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_id))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_id).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.s.barrier.signal' op attribute 'id' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult BarrierSignalOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.id;
       auto attr = dict.get("id");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `id` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute BarrierSignalOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.id;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("id",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BarrierSignalOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.id.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> BarrierSignalOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "id")
      return prop.id;
  return std::nullopt;
}

void BarrierSignalOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "id") {
       prop.id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.id)>>(value);
       return;
    }
}

void BarrierSignalOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.id) attrs.append("id", prop.id);
}

::llvm::LogicalResult BarrierSignalOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getIdAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "id", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult BarrierSignalOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.id)))
    return ::mlir::failure();
  return ::mlir::success();
}

void BarrierSignalOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.id);
}

uint32_t BarrierSignalOp::getId() {
  auto attr = getIdAttr();
  return attr.getValue().getZExtValue();
}

void BarrierSignalOp::setId(uint32_t attrValue) {
  getProperties().id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void BarrierSignalOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr id) {
  odsState.getOrAddProperties<Properties>().id = id;
}

BarrierSignalOp BarrierSignalOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, id);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalOp BarrierSignalOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr id) {
  return create(builder, builder.getLoc(), id);
}

void BarrierSignalOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  odsState.getOrAddProperties<Properties>().id = id;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BarrierSignalOp BarrierSignalOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, id);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalOp BarrierSignalOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  return create(builder, builder.getLoc(), resultTypes, id);
}

void BarrierSignalOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t id) {
  odsState.getOrAddProperties<Properties>().id = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), id);
}

BarrierSignalOp BarrierSignalOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, id);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalOp BarrierSignalOp::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t id) {
  return create(builder, builder.getLoc(), id);
}

void BarrierSignalOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t id) {
  odsState.getOrAddProperties<Properties>().id = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), id);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BarrierSignalOp BarrierSignalOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, id);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalOp BarrierSignalOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t id) {
  return create(builder, builder.getLoc(), resultTypes, id);
}

void BarrierSignalOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<BarrierSignalOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

BarrierSignalOp BarrierSignalOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalOp BarrierSignalOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BarrierSignalOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BarrierSignalOp BarrierSignalOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalOp BarrierSignalOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BarrierSignalOp::verifyInvariantsImpl() {
  auto tblgen_id = getProperties().id; (void)tblgen_id;
  if (!tblgen_id) return emitOpError("requires attribute 'id'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_id, "id")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult BarrierSignalOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BarrierSignalOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr idAttr;

  if (parser.parseCustomAttributeWithFallback(idAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (idAttr) result.getOrAddProperties<BarrierSignalOp::Properties>().id = idAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void BarrierSignalOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getIdAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("id");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BarrierSignalOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BarrierSignalVarOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BarrierSignalVarOpGenericAdaptorBase::BarrierSignalVarOpGenericAdaptorBase(BarrierSignalVarOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t BarrierSignalVarOpGenericAdaptorBase::getId() {
  auto attr = getIdAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
BarrierSignalVarOpAdaptor::BarrierSignalVarOpAdaptor(BarrierSignalVarOp op) : BarrierSignalVarOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BarrierSignalVarOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_id = getProperties().id; (void)tblgen_id;
  if (!tblgen_id) return emitError(loc, "'rocdl.s.barrier.signal.var' op requires attribute 'id'");

  if (tblgen_id && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_id))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_id).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.s.barrier.signal.var' op attribute 'id' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult BarrierSignalVarOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.id;
       auto attr = dict.get("id");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `id` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute BarrierSignalVarOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.id;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("id",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BarrierSignalVarOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.id.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> BarrierSignalVarOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "id")
      return prop.id;
  return std::nullopt;
}

void BarrierSignalVarOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "id") {
       prop.id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.id)>>(value);
       return;
    }
}

void BarrierSignalVarOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.id) attrs.append("id", prop.id);
}

::llvm::LogicalResult BarrierSignalVarOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getIdAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "id", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult BarrierSignalVarOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.id)))
    return ::mlir::failure();
  return ::mlir::success();
}

void BarrierSignalVarOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.id);
}

uint32_t BarrierSignalVarOp::getId() {
  auto attr = getIdAttr();
  return attr.getValue().getZExtValue();
}

void BarrierSignalVarOp::setId(uint32_t attrValue) {
  getProperties().id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void BarrierSignalVarOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr, ::mlir::IntegerAttr id) {
  odsState.addOperands(ptr);
  odsState.getOrAddProperties<Properties>().id = id;
}

BarrierSignalVarOp BarrierSignalVarOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr, ::mlir::IntegerAttr id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, ptr, id);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalVarOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalVarOp BarrierSignalVarOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr, ::mlir::IntegerAttr id) {
  return create(builder, builder.getLoc(), ptr, id);
}

void BarrierSignalVarOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::IntegerAttr id) {
  odsState.addOperands(ptr);
  odsState.getOrAddProperties<Properties>().id = id;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BarrierSignalVarOp BarrierSignalVarOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::IntegerAttr id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, id);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalVarOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalVarOp BarrierSignalVarOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::IntegerAttr id) {
  return create(builder, builder.getLoc(), resultTypes, ptr, id);
}

void BarrierSignalVarOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr, uint32_t id) {
  odsState.addOperands(ptr);
  odsState.getOrAddProperties<Properties>().id = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), id);
}

BarrierSignalVarOp BarrierSignalVarOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr, uint32_t id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, ptr, id);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalVarOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalVarOp BarrierSignalVarOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr, uint32_t id) {
  return create(builder, builder.getLoc(), ptr, id);
}

void BarrierSignalVarOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, uint32_t id) {
  odsState.addOperands(ptr);
  odsState.getOrAddProperties<Properties>().id = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), id);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BarrierSignalVarOp BarrierSignalVarOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, uint32_t id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, id);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalVarOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalVarOp BarrierSignalVarOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, uint32_t id) {
  return create(builder, builder.getLoc(), resultTypes, ptr, id);
}

void BarrierSignalVarOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<BarrierSignalVarOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

BarrierSignalVarOp BarrierSignalVarOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalVarOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalVarOp BarrierSignalVarOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BarrierSignalVarOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BarrierSignalVarOp BarrierSignalVarOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BarrierSignalVarOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierSignalVarOp BarrierSignalVarOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BarrierSignalVarOp::verifyInvariantsImpl() {
  auto tblgen_id = getProperties().id; (void)tblgen_id;
  if (!tblgen_id) return emitOpError("requires attribute 'id'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_id, "id")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult BarrierSignalVarOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BarrierSignalVarOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::IntegerAttr idAttr;

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(idAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (idAttr) result.getOrAddProperties<BarrierSignalVarOp::Properties>().id = idAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(3);
  if (parser.resolveOperands(ptrOperands, odsBuildableType0, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void BarrierSignalVarOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getIdAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("id");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BarrierSignalVarOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BarrierWaitOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BarrierWaitOpGenericAdaptorBase::BarrierWaitOpGenericAdaptorBase(BarrierWaitOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint16_t BarrierWaitOpGenericAdaptorBase::getId() {
  auto attr = getIdAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
BarrierWaitOpAdaptor::BarrierWaitOpAdaptor(BarrierWaitOp op) : BarrierWaitOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BarrierWaitOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_id = getProperties().id; (void)tblgen_id;
  if (!tblgen_id) return emitError(loc, "'rocdl.s.barrier.wait' op requires attribute 'id'");

  if (tblgen_id && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_id))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_id).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.s.barrier.wait' op attribute 'id' failed to satisfy constraint: 16-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult BarrierWaitOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.id;
       auto attr = dict.get("id");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `id` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute BarrierWaitOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.id;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("id",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BarrierWaitOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.id.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> BarrierWaitOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "id")
      return prop.id;
  return std::nullopt;
}

void BarrierWaitOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "id") {
       prop.id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.id)>>(value);
       return;
    }
}

void BarrierWaitOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.id) attrs.append("id", prop.id);
}

::llvm::LogicalResult BarrierWaitOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getIdAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "id", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult BarrierWaitOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.id)))
    return ::mlir::failure();
  return ::mlir::success();
}

void BarrierWaitOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.id);
}

uint16_t BarrierWaitOp::getId() {
  auto attr = getIdAttr();
  return attr.getValue().getZExtValue();
}

void BarrierWaitOp::setId(uint16_t attrValue) {
  getProperties().id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void BarrierWaitOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr id) {
  odsState.getOrAddProperties<Properties>().id = id;
}

BarrierWaitOp BarrierWaitOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, id);
  auto __res__ = ::llvm::dyn_cast<BarrierWaitOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierWaitOp BarrierWaitOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr id) {
  return create(builder, builder.getLoc(), id);
}

void BarrierWaitOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  odsState.getOrAddProperties<Properties>().id = id;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BarrierWaitOp BarrierWaitOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, id);
  auto __res__ = ::llvm::dyn_cast<BarrierWaitOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierWaitOp BarrierWaitOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  return create(builder, builder.getLoc(), resultTypes, id);
}

void BarrierWaitOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint16_t id) {
  odsState.getOrAddProperties<Properties>().id = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), id);
}

BarrierWaitOp BarrierWaitOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint16_t id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, id);
  auto __res__ = ::llvm::dyn_cast<BarrierWaitOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierWaitOp BarrierWaitOp::create(::mlir::ImplicitLocOpBuilder &builder, uint16_t id) {
  return create(builder, builder.getLoc(), id);
}

void BarrierWaitOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint16_t id) {
  odsState.getOrAddProperties<Properties>().id = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), id);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BarrierWaitOp BarrierWaitOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint16_t id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, id);
  auto __res__ = ::llvm::dyn_cast<BarrierWaitOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierWaitOp BarrierWaitOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint16_t id) {
  return create(builder, builder.getLoc(), resultTypes, id);
}

void BarrierWaitOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<BarrierWaitOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

BarrierWaitOp BarrierWaitOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BarrierWaitOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierWaitOp BarrierWaitOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BarrierWaitOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BarrierWaitOp BarrierWaitOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BarrierWaitOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BarrierWaitOp BarrierWaitOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BarrierWaitOp::verifyInvariantsImpl() {
  auto tblgen_id = getProperties().id; (void)tblgen_id;
  if (!tblgen_id) return emitOpError("requires attribute 'id'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_id, "id")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult BarrierWaitOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BarrierWaitOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr idAttr;

  if (parser.parseCustomAttributeWithFallback(idAttr, parser.getBuilder().getIntegerType(16))) {
    return ::mlir::failure();
  }
  if (idAttr) result.getOrAddProperties<BarrierWaitOp::Properties>().id = idAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void BarrierWaitOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getIdAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("id");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BarrierWaitOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BlockDimXOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BlockDimXOpGenericAdaptorBase::BlockDimXOpGenericAdaptorBase(BlockDimXOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> BlockDimXOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
BlockDimXOpAdaptor::BlockDimXOpAdaptor(BlockDimXOp op) : BlockDimXOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BlockDimXOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.workgroup.dim.x' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult BlockDimXOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute BlockDimXOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BlockDimXOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> BlockDimXOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void BlockDimXOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void BlockDimXOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult BlockDimXOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult BlockDimXOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void BlockDimXOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> BlockDimXOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void BlockDimXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

BlockDimXOp BlockDimXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<BlockDimXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimXOp BlockDimXOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void BlockDimXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

BlockDimXOp BlockDimXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<BlockDimXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimXOp BlockDimXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void BlockDimXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BlockDimXOp BlockDimXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<BlockDimXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimXOp BlockDimXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void BlockDimXOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<BlockDimXOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

BlockDimXOp BlockDimXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BlockDimXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimXOp BlockDimXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BlockDimXOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BlockDimXOp BlockDimXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BlockDimXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimXOp BlockDimXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BlockDimXOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult BlockDimXOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BlockDimXOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<BlockDimXOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void BlockDimXOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void BlockDimXOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BlockDimXOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BlockDimYOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BlockDimYOpGenericAdaptorBase::BlockDimYOpGenericAdaptorBase(BlockDimYOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> BlockDimYOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
BlockDimYOpAdaptor::BlockDimYOpAdaptor(BlockDimYOp op) : BlockDimYOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BlockDimYOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.workgroup.dim.y' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult BlockDimYOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute BlockDimYOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BlockDimYOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> BlockDimYOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void BlockDimYOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void BlockDimYOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult BlockDimYOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult BlockDimYOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void BlockDimYOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> BlockDimYOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void BlockDimYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

BlockDimYOp BlockDimYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<BlockDimYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimYOp BlockDimYOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void BlockDimYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

BlockDimYOp BlockDimYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<BlockDimYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimYOp BlockDimYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void BlockDimYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BlockDimYOp BlockDimYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<BlockDimYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimYOp BlockDimYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void BlockDimYOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<BlockDimYOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

BlockDimYOp BlockDimYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BlockDimYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimYOp BlockDimYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BlockDimYOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BlockDimYOp BlockDimYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BlockDimYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimYOp BlockDimYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BlockDimYOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult BlockDimYOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BlockDimYOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<BlockDimYOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void BlockDimYOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void BlockDimYOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BlockDimYOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BlockDimZOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BlockDimZOpGenericAdaptorBase::BlockDimZOpGenericAdaptorBase(BlockDimZOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> BlockDimZOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
BlockDimZOpAdaptor::BlockDimZOpAdaptor(BlockDimZOp op) : BlockDimZOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BlockDimZOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.workgroup.dim.z' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult BlockDimZOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute BlockDimZOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BlockDimZOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> BlockDimZOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void BlockDimZOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void BlockDimZOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult BlockDimZOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult BlockDimZOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void BlockDimZOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> BlockDimZOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void BlockDimZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

BlockDimZOp BlockDimZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<BlockDimZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimZOp BlockDimZOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void BlockDimZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

BlockDimZOp BlockDimZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<BlockDimZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimZOp BlockDimZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void BlockDimZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BlockDimZOp BlockDimZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<BlockDimZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimZOp BlockDimZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void BlockDimZOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<BlockDimZOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

BlockDimZOp BlockDimZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BlockDimZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimZOp BlockDimZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BlockDimZOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BlockDimZOp BlockDimZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BlockDimZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockDimZOp BlockDimZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BlockDimZOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult BlockDimZOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BlockDimZOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<BlockDimZOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void BlockDimZOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void BlockDimZOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BlockDimZOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BlockIdXOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BlockIdXOpGenericAdaptorBase::BlockIdXOpGenericAdaptorBase(BlockIdXOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> BlockIdXOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
BlockIdXOpAdaptor::BlockIdXOpAdaptor(BlockIdXOp op) : BlockIdXOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BlockIdXOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.workgroup.id.x' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult BlockIdXOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute BlockIdXOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BlockIdXOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> BlockIdXOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void BlockIdXOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void BlockIdXOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult BlockIdXOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult BlockIdXOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void BlockIdXOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> BlockIdXOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void BlockIdXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

BlockIdXOp BlockIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<BlockIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdXOp BlockIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void BlockIdXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

BlockIdXOp BlockIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<BlockIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdXOp BlockIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void BlockIdXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BlockIdXOp BlockIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<BlockIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdXOp BlockIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void BlockIdXOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<BlockIdXOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

BlockIdXOp BlockIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BlockIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdXOp BlockIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BlockIdXOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BlockIdXOp BlockIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BlockIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdXOp BlockIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BlockIdXOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult BlockIdXOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BlockIdXOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<BlockIdXOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void BlockIdXOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void BlockIdXOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BlockIdXOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BlockIdYOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BlockIdYOpGenericAdaptorBase::BlockIdYOpGenericAdaptorBase(BlockIdYOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> BlockIdYOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
BlockIdYOpAdaptor::BlockIdYOpAdaptor(BlockIdYOp op) : BlockIdYOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BlockIdYOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.workgroup.id.y' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult BlockIdYOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute BlockIdYOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BlockIdYOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> BlockIdYOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void BlockIdYOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void BlockIdYOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult BlockIdYOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult BlockIdYOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void BlockIdYOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> BlockIdYOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void BlockIdYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

BlockIdYOp BlockIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<BlockIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdYOp BlockIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void BlockIdYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

BlockIdYOp BlockIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<BlockIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdYOp BlockIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void BlockIdYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BlockIdYOp BlockIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<BlockIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdYOp BlockIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void BlockIdYOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<BlockIdYOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

BlockIdYOp BlockIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BlockIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdYOp BlockIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BlockIdYOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BlockIdYOp BlockIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BlockIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdYOp BlockIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BlockIdYOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult BlockIdYOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BlockIdYOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<BlockIdYOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void BlockIdYOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void BlockIdYOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BlockIdYOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::BlockIdZOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

BlockIdZOpGenericAdaptorBase::BlockIdZOpGenericAdaptorBase(BlockIdZOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> BlockIdZOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
BlockIdZOpAdaptor::BlockIdZOpAdaptor(BlockIdZOp op) : BlockIdZOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult BlockIdZOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.workgroup.id.z' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult BlockIdZOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute BlockIdZOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code BlockIdZOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> BlockIdZOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void BlockIdZOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void BlockIdZOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult BlockIdZOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult BlockIdZOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void BlockIdZOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> BlockIdZOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void BlockIdZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

BlockIdZOp BlockIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<BlockIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdZOp BlockIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void BlockIdZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

BlockIdZOp BlockIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<BlockIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdZOp BlockIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void BlockIdZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

BlockIdZOp BlockIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<BlockIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdZOp BlockIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void BlockIdZOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<BlockIdZOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

BlockIdZOp BlockIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<BlockIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdZOp BlockIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void BlockIdZOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

BlockIdZOp BlockIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<BlockIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

BlockIdZOp BlockIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult BlockIdZOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult BlockIdZOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult BlockIdZOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<BlockIdZOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void BlockIdZOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void BlockIdZOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BlockIdZOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::ClusterIdXOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ClusterIdXOpGenericAdaptorBase::ClusterIdXOpGenericAdaptorBase(ClusterIdXOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> ClusterIdXOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
ClusterIdXOpAdaptor::ClusterIdXOpAdaptor(ClusterIdXOp op) : ClusterIdXOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ClusterIdXOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.cluster.id.x' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult ClusterIdXOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ClusterIdXOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ClusterIdXOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ClusterIdXOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void ClusterIdXOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void ClusterIdXOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult ClusterIdXOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ClusterIdXOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ClusterIdXOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> ClusterIdXOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void ClusterIdXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

ClusterIdXOp ClusterIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<ClusterIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdXOp ClusterIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void ClusterIdXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

ClusterIdXOp ClusterIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<ClusterIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdXOp ClusterIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void ClusterIdXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ClusterIdXOp ClusterIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<ClusterIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdXOp ClusterIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void ClusterIdXOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<ClusterIdXOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ClusterIdXOp ClusterIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<ClusterIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdXOp ClusterIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void ClusterIdXOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ClusterIdXOp ClusterIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<ClusterIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdXOp ClusterIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult ClusterIdXOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult ClusterIdXOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ClusterIdXOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<ClusterIdXOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void ClusterIdXOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void ClusterIdXOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::ClusterIdXOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::ClusterIdYOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ClusterIdYOpGenericAdaptorBase::ClusterIdYOpGenericAdaptorBase(ClusterIdYOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> ClusterIdYOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
ClusterIdYOpAdaptor::ClusterIdYOpAdaptor(ClusterIdYOp op) : ClusterIdYOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ClusterIdYOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.cluster.id.y' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult ClusterIdYOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ClusterIdYOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ClusterIdYOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ClusterIdYOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void ClusterIdYOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void ClusterIdYOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult ClusterIdYOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ClusterIdYOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ClusterIdYOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> ClusterIdYOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void ClusterIdYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

ClusterIdYOp ClusterIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<ClusterIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdYOp ClusterIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void ClusterIdYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

ClusterIdYOp ClusterIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<ClusterIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdYOp ClusterIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void ClusterIdYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ClusterIdYOp ClusterIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<ClusterIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdYOp ClusterIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void ClusterIdYOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<ClusterIdYOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ClusterIdYOp ClusterIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<ClusterIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdYOp ClusterIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void ClusterIdYOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ClusterIdYOp ClusterIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<ClusterIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdYOp ClusterIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult ClusterIdYOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult ClusterIdYOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ClusterIdYOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<ClusterIdYOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void ClusterIdYOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void ClusterIdYOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::ClusterIdYOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::ClusterIdZOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ClusterIdZOpGenericAdaptorBase::ClusterIdZOpGenericAdaptorBase(ClusterIdZOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> ClusterIdZOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
ClusterIdZOpAdaptor::ClusterIdZOpAdaptor(ClusterIdZOp op) : ClusterIdZOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ClusterIdZOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.cluster.id.z' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult ClusterIdZOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ClusterIdZOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ClusterIdZOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ClusterIdZOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void ClusterIdZOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void ClusterIdZOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult ClusterIdZOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ClusterIdZOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ClusterIdZOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> ClusterIdZOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void ClusterIdZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

ClusterIdZOp ClusterIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<ClusterIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdZOp ClusterIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void ClusterIdZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

ClusterIdZOp ClusterIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<ClusterIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdZOp ClusterIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void ClusterIdZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ClusterIdZOp ClusterIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<ClusterIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdZOp ClusterIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void ClusterIdZOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<ClusterIdZOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ClusterIdZOp ClusterIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<ClusterIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdZOp ClusterIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void ClusterIdZOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ClusterIdZOp ClusterIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<ClusterIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ClusterIdZOp ClusterIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult ClusterIdZOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult ClusterIdZOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ClusterIdZOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<ClusterIdZOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void ClusterIdZOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void ClusterIdZOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::ClusterIdZOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtF32Bf8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtF32Bf8OpGenericAdaptorBase::CvtF32Bf8OpGenericAdaptorBase(CvtF32Bf8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtF32Bf8OpGenericAdaptorBase::getByteSel() {
  auto attr = getByteSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtF32Bf8OpAdaptor::CvtF32Bf8OpAdaptor(CvtF32Bf8Op op) : CvtF32Bf8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtF32Bf8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_byteSel = getProperties().byteSel; (void)tblgen_byteSel;
  if (!tblgen_byteSel) return emitError(loc, "'rocdl.cvt.f32.bf8' op requires attribute 'byteSel'");

  if (tblgen_byteSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_byteSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_byteSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.f32.bf8' op attribute 'byteSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtF32Bf8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.byteSel;
       auto attr = dict.get("byteSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `byteSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtF32Bf8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.byteSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("byteSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtF32Bf8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.byteSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtF32Bf8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "byteSel")
      return prop.byteSel;
  return std::nullopt;
}

void CvtF32Bf8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "byteSel") {
       prop.byteSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.byteSel)>>(value);
       return;
    }
}

void CvtF32Bf8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.byteSel) attrs.append("byteSel", prop.byteSel);
}

::llvm::LogicalResult CvtF32Bf8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getByteSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "byteSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtF32Bf8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.byteSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtF32Bf8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.byteSel);
}

uint32_t CvtF32Bf8Op::getByteSel() {
  auto attr = getByteSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtF32Bf8Op::setByteSel(uint32_t attrValue) {
  getProperties().byteSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtF32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcA, ::mlir::IntegerAttr byteSel) {
  odsState.addOperands(srcA);
  odsState.getOrAddProperties<Properties>().byteSel = byteSel;
  odsState.addTypes(res);
}

CvtF32Bf8Op CvtF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcA, ::mlir::IntegerAttr byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, srcA, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtF32Bf8Op CvtF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcA, ::mlir::IntegerAttr byteSel) {
  return create(builder, builder.getLoc(), res, srcA, byteSel);
}

void CvtF32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::IntegerAttr byteSel) {
  odsState.addOperands(srcA);
  odsState.getOrAddProperties<Properties>().byteSel = byteSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtF32Bf8Op CvtF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::IntegerAttr byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, srcA, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtF32Bf8Op CvtF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::IntegerAttr byteSel) {
  return create(builder, builder.getLoc(), resultTypes, srcA, byteSel);
}

void CvtF32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcA, uint32_t byteSel) {
  odsState.addOperands(srcA);
  odsState.getOrAddProperties<Properties>().byteSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), byteSel);
  odsState.addTypes(res);
}

CvtF32Bf8Op CvtF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcA, uint32_t byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, srcA, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtF32Bf8Op CvtF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcA, uint32_t byteSel) {
  return create(builder, builder.getLoc(), res, srcA, byteSel);
}

void CvtF32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, uint32_t byteSel) {
  odsState.addOperands(srcA);
  odsState.getOrAddProperties<Properties>().byteSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), byteSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtF32Bf8Op CvtF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, uint32_t byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, srcA, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtF32Bf8Op CvtF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, uint32_t byteSel) {
  return create(builder, builder.getLoc(), resultTypes, srcA, byteSel);
}

void CvtF32Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtF32Bf8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtF32Bf8Op CvtF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtF32Bf8Op CvtF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtF32Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtF32Bf8Op CvtF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtF32Bf8Op CvtF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtF32Bf8Op::verifyInvariantsImpl() {
  auto tblgen_byteSel = getProperties().byteSel; (void)tblgen_byteSel;
  if (!tblgen_byteSel) return emitOpError("requires attribute 'byteSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_byteSel, "byteSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtF32Bf8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtF32Bf8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcARawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcAOperands(&srcARawOperand, 1);  ::llvm::SMLoc srcAOperandsLoc;
  (void)srcAOperandsLoc;
  ::mlir::IntegerAttr byteSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcAOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcARawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(byteSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (byteSelAttr) result.getOrAddProperties<CvtF32Bf8Op::Properties>().byteSel = byteSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcAOperands, odsBuildableType0, srcAOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtF32Bf8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("byteSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrcA();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getByteSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtF32Bf8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtF32Bf8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtF32Fp8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtF32Fp8OpGenericAdaptorBase::CvtF32Fp8OpGenericAdaptorBase(CvtF32Fp8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtF32Fp8OpGenericAdaptorBase::getByteSel() {
  auto attr = getByteSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtF32Fp8OpAdaptor::CvtF32Fp8OpAdaptor(CvtF32Fp8Op op) : CvtF32Fp8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtF32Fp8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_byteSel = getProperties().byteSel; (void)tblgen_byteSel;
  if (!tblgen_byteSel) return emitError(loc, "'rocdl.cvt.f32.fp8' op requires attribute 'byteSel'");

  if (tblgen_byteSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_byteSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_byteSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.f32.fp8' op attribute 'byteSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtF32Fp8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.byteSel;
       auto attr = dict.get("byteSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `byteSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtF32Fp8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.byteSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("byteSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtF32Fp8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.byteSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtF32Fp8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "byteSel")
      return prop.byteSel;
  return std::nullopt;
}

void CvtF32Fp8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "byteSel") {
       prop.byteSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.byteSel)>>(value);
       return;
    }
}

void CvtF32Fp8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.byteSel) attrs.append("byteSel", prop.byteSel);
}

::llvm::LogicalResult CvtF32Fp8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getByteSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "byteSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtF32Fp8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.byteSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtF32Fp8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.byteSel);
}

uint32_t CvtF32Fp8Op::getByteSel() {
  auto attr = getByteSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtF32Fp8Op::setByteSel(uint32_t attrValue) {
  getProperties().byteSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtF32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcA, ::mlir::IntegerAttr byteSel) {
  odsState.addOperands(srcA);
  odsState.getOrAddProperties<Properties>().byteSel = byteSel;
  odsState.addTypes(res);
}

CvtF32Fp8Op CvtF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcA, ::mlir::IntegerAttr byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, srcA, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtF32Fp8Op CvtF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcA, ::mlir::IntegerAttr byteSel) {
  return create(builder, builder.getLoc(), res, srcA, byteSel);
}

void CvtF32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::IntegerAttr byteSel) {
  odsState.addOperands(srcA);
  odsState.getOrAddProperties<Properties>().byteSel = byteSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtF32Fp8Op CvtF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::IntegerAttr byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, srcA, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtF32Fp8Op CvtF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::IntegerAttr byteSel) {
  return create(builder, builder.getLoc(), resultTypes, srcA, byteSel);
}

void CvtF32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcA, uint32_t byteSel) {
  odsState.addOperands(srcA);
  odsState.getOrAddProperties<Properties>().byteSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), byteSel);
  odsState.addTypes(res);
}

CvtF32Fp8Op CvtF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcA, uint32_t byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, srcA, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtF32Fp8Op CvtF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcA, uint32_t byteSel) {
  return create(builder, builder.getLoc(), res, srcA, byteSel);
}

void CvtF32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, uint32_t byteSel) {
  odsState.addOperands(srcA);
  odsState.getOrAddProperties<Properties>().byteSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), byteSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtF32Fp8Op CvtF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, uint32_t byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, srcA, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtF32Fp8Op CvtF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, uint32_t byteSel) {
  return create(builder, builder.getLoc(), resultTypes, srcA, byteSel);
}

void CvtF32Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtF32Fp8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtF32Fp8Op CvtF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtF32Fp8Op CvtF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtF32Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtF32Fp8Op CvtF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtF32Fp8Op CvtF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtF32Fp8Op::verifyInvariantsImpl() {
  auto tblgen_byteSel = getProperties().byteSel; (void)tblgen_byteSel;
  if (!tblgen_byteSel) return emitOpError("requires attribute 'byteSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_byteSel, "byteSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtF32Fp8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtF32Fp8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcARawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcAOperands(&srcARawOperand, 1);  ::llvm::SMLoc srcAOperandsLoc;
  (void)srcAOperandsLoc;
  ::mlir::IntegerAttr byteSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcAOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcARawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(byteSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (byteSelAttr) result.getOrAddProperties<CvtF32Fp8Op::Properties>().byteSel = byteSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcAOperands, odsBuildableType0, srcAOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtF32Fp8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("byteSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrcA();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getByteSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtF32Fp8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtF32Fp8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkBf8F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkBf8F32OpGenericAdaptorBase::CvtPkBf8F32OpGenericAdaptorBase(CvtPkBf8F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtPkBf8F32OpGenericAdaptorBase::getWordSel() {
  auto attr = getWordSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkBf8F32OpAdaptor::CvtPkBf8F32OpAdaptor(CvtPkBf8F32Op op) : CvtPkBf8F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkBf8F32OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_wordSel = getProperties().wordSel; (void)tblgen_wordSel;
  if (!tblgen_wordSel) return emitError(loc, "'rocdl.cvt.pk.bf8.f32' op requires attribute 'wordSel'");

  if (tblgen_wordSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_wordSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_wordSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.pk.bf8.f32' op attribute 'wordSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkBf8F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.wordSel;
       auto attr = dict.get("wordSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `wordSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkBf8F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.wordSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("wordSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkBf8F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.wordSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkBf8F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "wordSel")
      return prop.wordSel;
  return std::nullopt;
}

void CvtPkBf8F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "wordSel") {
       prop.wordSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.wordSel)>>(value);
       return;
    }
}

void CvtPkBf8F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.wordSel) attrs.append("wordSel", prop.wordSel);
}

::llvm::LogicalResult CvtPkBf8F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getWordSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "wordSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkBf8F32Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.wordSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkBf8F32Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.wordSel);
}

bool CvtPkBf8F32Op::getWordSel() {
  auto attr = getWordSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkBf8F32Op::setWordSel(bool attrValue) {
  getProperties().wordSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtPkBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr wordSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().wordSel = wordSel;
  odsState.addTypes(res);
}

CvtPkBf8F32Op CvtPkBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, srcA, srcB, old, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkBf8F32Op CvtPkBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr wordSel) {
  return create(builder, builder.getLoc(), res, srcA, srcB, old, wordSel);
}

void CvtPkBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr wordSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().wordSel = wordSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkBf8F32Op CvtPkBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, srcA, srcB, old, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkBf8F32Op CvtPkBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr wordSel) {
  return create(builder, builder.getLoc(), resultTypes, srcA, srcB, old, wordSel);
}

void CvtPkBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, bool wordSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().wordSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), wordSel);
  odsState.addTypes(res);
}

CvtPkBf8F32Op CvtPkBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, bool wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, srcA, srcB, old, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkBf8F32Op CvtPkBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, bool wordSel) {
  return create(builder, builder.getLoc(), res, srcA, srcB, old, wordSel);
}

void CvtPkBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, bool wordSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().wordSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), wordSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkBf8F32Op CvtPkBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, bool wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, srcA, srcB, old, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkBf8F32Op CvtPkBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, bool wordSel) {
  return create(builder, builder.getLoc(), resultTypes, srcA, srcB, old, wordSel);
}

void CvtPkBf8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkBf8F32Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkBf8F32Op CvtPkBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkBf8F32Op CvtPkBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkBf8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkBf8F32Op CvtPkBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkBf8F32Op CvtPkBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkBf8F32Op::verifyInvariantsImpl() {
  auto tblgen_wordSel = getProperties().wordSel; (void)tblgen_wordSel;
  if (!tblgen_wordSel) return emitOpError("requires attribute 'wordSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_wordSel, "wordSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkBf8F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkBf8F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcARawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcAOperands(&srcARawOperand, 1);  ::llvm::SMLoc srcAOperandsLoc;
  (void)srcAOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand srcBRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcBOperands(&srcBRawOperand, 1);  ::llvm::SMLoc srcBOperandsLoc;
  (void)srcBOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldOperands(&oldRawOperand, 1);  ::llvm::SMLoc oldOperandsLoc;
  (void)oldOperandsLoc;
  ::mlir::IntegerAttr wordSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcAOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcARawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  srcBOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcBRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(wordSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (wordSelAttr) result.getOrAddProperties<CvtPkBf8F32Op::Properties>().wordSel = wordSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getF32Type();
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcAOperands, odsBuildableType0, srcAOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcBOperands, odsBuildableType0, srcBOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(oldOperands, odsBuildableType1, oldOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkBf8F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("wordSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrcA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrcB();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOld();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getWordSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkBf8F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkBf8F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkF32Bf8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkF32Bf8OpGenericAdaptorBase::CvtPkF32Bf8OpGenericAdaptorBase(CvtPkF32Bf8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtPkF32Bf8OpGenericAdaptorBase::getWordSel() {
  auto attr = getWordSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkF32Bf8OpAdaptor::CvtPkF32Bf8OpAdaptor(CvtPkF32Bf8Op op) : CvtPkF32Bf8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkF32Bf8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_wordSel = getProperties().wordSel; (void)tblgen_wordSel;
  if (!tblgen_wordSel) return emitError(loc, "'rocdl.cvt.pk.f32.bf8' op requires attribute 'wordSel'");

  if (tblgen_wordSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_wordSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_wordSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.pk.f32.bf8' op attribute 'wordSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkF32Bf8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.wordSel;
       auto attr = dict.get("wordSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `wordSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkF32Bf8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.wordSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("wordSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkF32Bf8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.wordSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkF32Bf8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "wordSel")
      return prop.wordSel;
  return std::nullopt;
}

void CvtPkF32Bf8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "wordSel") {
       prop.wordSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.wordSel)>>(value);
       return;
    }
}

void CvtPkF32Bf8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.wordSel) attrs.append("wordSel", prop.wordSel);
}

::llvm::LogicalResult CvtPkF32Bf8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getWordSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "wordSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkF32Bf8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.wordSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkF32Bf8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.wordSel);
}

bool CvtPkF32Bf8Op::getWordSel() {
  auto attr = getWordSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkF32Bf8Op::setWordSel(bool attrValue) {
  getProperties().wordSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtPkF32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::IntegerAttr wordSel) {
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().wordSel = wordSel;
  odsState.addTypes(res);
}

CvtPkF32Bf8Op CvtPkF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::IntegerAttr wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkF32Bf8Op CvtPkF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::IntegerAttr wordSel) {
  return create(builder, builder.getLoc(), res, src, wordSel);
}

void CvtPkF32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::IntegerAttr wordSel) {
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().wordSel = wordSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkF32Bf8Op CvtPkF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::IntegerAttr wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkF32Bf8Op CvtPkF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::IntegerAttr wordSel) {
  return create(builder, builder.getLoc(), resultTypes, src, wordSel);
}

void CvtPkF32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, bool wordSel) {
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().wordSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), wordSel);
  odsState.addTypes(res);
}

CvtPkF32Bf8Op CvtPkF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, bool wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkF32Bf8Op CvtPkF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, bool wordSel) {
  return create(builder, builder.getLoc(), res, src, wordSel);
}

void CvtPkF32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool wordSel) {
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().wordSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), wordSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkF32Bf8Op CvtPkF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkF32Bf8Op CvtPkF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool wordSel) {
  return create(builder, builder.getLoc(), resultTypes, src, wordSel);
}

void CvtPkF32Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkF32Bf8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkF32Bf8Op CvtPkF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkF32Bf8Op CvtPkF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkF32Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkF32Bf8Op CvtPkF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkF32Bf8Op CvtPkF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkF32Bf8Op::verifyInvariantsImpl() {
  auto tblgen_wordSel = getProperties().wordSel; (void)tblgen_wordSel;
  if (!tblgen_wordSel) return emitOpError("requires attribute 'wordSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_wordSel, "wordSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkF32Bf8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkF32Bf8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr wordSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(wordSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (wordSelAttr) result.getOrAddProperties<CvtPkF32Bf8Op::Properties>().wordSel = wordSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkF32Bf8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("wordSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getWordSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkF32Bf8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkF32Bf8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkF32Fp8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkF32Fp8OpGenericAdaptorBase::CvtPkF32Fp8OpGenericAdaptorBase(CvtPkF32Fp8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtPkF32Fp8OpGenericAdaptorBase::getWordSel() {
  auto attr = getWordSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkF32Fp8OpAdaptor::CvtPkF32Fp8OpAdaptor(CvtPkF32Fp8Op op) : CvtPkF32Fp8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkF32Fp8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_wordSel = getProperties().wordSel; (void)tblgen_wordSel;
  if (!tblgen_wordSel) return emitError(loc, "'rocdl.cvt.pk.f32.fp8' op requires attribute 'wordSel'");

  if (tblgen_wordSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_wordSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_wordSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.pk.f32.fp8' op attribute 'wordSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkF32Fp8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.wordSel;
       auto attr = dict.get("wordSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `wordSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkF32Fp8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.wordSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("wordSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkF32Fp8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.wordSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkF32Fp8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "wordSel")
      return prop.wordSel;
  return std::nullopt;
}

void CvtPkF32Fp8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "wordSel") {
       prop.wordSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.wordSel)>>(value);
       return;
    }
}

void CvtPkF32Fp8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.wordSel) attrs.append("wordSel", prop.wordSel);
}

::llvm::LogicalResult CvtPkF32Fp8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getWordSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "wordSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkF32Fp8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.wordSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkF32Fp8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.wordSel);
}

bool CvtPkF32Fp8Op::getWordSel() {
  auto attr = getWordSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkF32Fp8Op::setWordSel(bool attrValue) {
  getProperties().wordSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtPkF32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::IntegerAttr wordSel) {
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().wordSel = wordSel;
  odsState.addTypes(res);
}

CvtPkF32Fp8Op CvtPkF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::IntegerAttr wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkF32Fp8Op CvtPkF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::IntegerAttr wordSel) {
  return create(builder, builder.getLoc(), res, src, wordSel);
}

void CvtPkF32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::IntegerAttr wordSel) {
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().wordSel = wordSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkF32Fp8Op CvtPkF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::IntegerAttr wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkF32Fp8Op CvtPkF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::IntegerAttr wordSel) {
  return create(builder, builder.getLoc(), resultTypes, src, wordSel);
}

void CvtPkF32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, bool wordSel) {
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().wordSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), wordSel);
  odsState.addTypes(res);
}

CvtPkF32Fp8Op CvtPkF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, bool wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkF32Fp8Op CvtPkF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, bool wordSel) {
  return create(builder, builder.getLoc(), res, src, wordSel);
}

void CvtPkF32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool wordSel) {
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().wordSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), wordSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkF32Fp8Op CvtPkF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkF32Fp8Op CvtPkF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, bool wordSel) {
  return create(builder, builder.getLoc(), resultTypes, src, wordSel);
}

void CvtPkF32Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkF32Fp8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkF32Fp8Op CvtPkF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkF32Fp8Op CvtPkF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkF32Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkF32Fp8Op CvtPkF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkF32Fp8Op CvtPkF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkF32Fp8Op::verifyInvariantsImpl() {
  auto tblgen_wordSel = getProperties().wordSel; (void)tblgen_wordSel;
  if (!tblgen_wordSel) return emitOpError("requires attribute 'wordSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_wordSel, "wordSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkF32Fp8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkF32Fp8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr wordSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(wordSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (wordSelAttr) result.getOrAddProperties<CvtPkF32Fp8Op::Properties>().wordSel = wordSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkF32Fp8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("wordSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getWordSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkF32Fp8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkF32Fp8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkFp8F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkFp8F32OpGenericAdaptorBase::CvtPkFp8F32OpGenericAdaptorBase(CvtPkFp8F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtPkFp8F32OpGenericAdaptorBase::getWordSel() {
  auto attr = getWordSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkFp8F32OpAdaptor::CvtPkFp8F32OpAdaptor(CvtPkFp8F32Op op) : CvtPkFp8F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkFp8F32OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_wordSel = getProperties().wordSel; (void)tblgen_wordSel;
  if (!tblgen_wordSel) return emitError(loc, "'rocdl.cvt.pk.fp8.f32' op requires attribute 'wordSel'");

  if (tblgen_wordSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_wordSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_wordSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.pk.fp8.f32' op attribute 'wordSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkFp8F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.wordSel;
       auto attr = dict.get("wordSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `wordSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkFp8F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.wordSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("wordSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkFp8F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.wordSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkFp8F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "wordSel")
      return prop.wordSel;
  return std::nullopt;
}

void CvtPkFp8F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "wordSel") {
       prop.wordSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.wordSel)>>(value);
       return;
    }
}

void CvtPkFp8F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.wordSel) attrs.append("wordSel", prop.wordSel);
}

::llvm::LogicalResult CvtPkFp8F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getWordSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "wordSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkFp8F32Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.wordSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkFp8F32Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.wordSel);
}

bool CvtPkFp8F32Op::getWordSel() {
  auto attr = getWordSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkFp8F32Op::setWordSel(bool attrValue) {
  getProperties().wordSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtPkFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr wordSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().wordSel = wordSel;
  odsState.addTypes(res);
}

CvtPkFp8F32Op CvtPkFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, srcA, srcB, old, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkFp8F32Op CvtPkFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr wordSel) {
  return create(builder, builder.getLoc(), res, srcA, srcB, old, wordSel);
}

void CvtPkFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr wordSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().wordSel = wordSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkFp8F32Op CvtPkFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, srcA, srcB, old, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkFp8F32Op CvtPkFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr wordSel) {
  return create(builder, builder.getLoc(), resultTypes, srcA, srcB, old, wordSel);
}

void CvtPkFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, bool wordSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().wordSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), wordSel);
  odsState.addTypes(res);
}

CvtPkFp8F32Op CvtPkFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, bool wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, srcA, srcB, old, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkFp8F32Op CvtPkFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, bool wordSel) {
  return create(builder, builder.getLoc(), res, srcA, srcB, old, wordSel);
}

void CvtPkFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, bool wordSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().wordSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), wordSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkFp8F32Op CvtPkFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, bool wordSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, srcA, srcB, old, wordSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkFp8F32Op CvtPkFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, bool wordSel) {
  return create(builder, builder.getLoc(), resultTypes, srcA, srcB, old, wordSel);
}

void CvtPkFp8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkFp8F32Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkFp8F32Op CvtPkFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkFp8F32Op CvtPkFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkFp8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkFp8F32Op CvtPkFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkFp8F32Op CvtPkFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkFp8F32Op::verifyInvariantsImpl() {
  auto tblgen_wordSel = getProperties().wordSel; (void)tblgen_wordSel;
  if (!tblgen_wordSel) return emitOpError("requires attribute 'wordSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_wordSel, "wordSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkFp8F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkFp8F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcARawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcAOperands(&srcARawOperand, 1);  ::llvm::SMLoc srcAOperandsLoc;
  (void)srcAOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand srcBRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcBOperands(&srcBRawOperand, 1);  ::llvm::SMLoc srcBOperandsLoc;
  (void)srcBOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldOperands(&oldRawOperand, 1);  ::llvm::SMLoc oldOperandsLoc;
  (void)oldOperandsLoc;
  ::mlir::IntegerAttr wordSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcAOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcARawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  srcBOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcBRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(wordSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (wordSelAttr) result.getOrAddProperties<CvtPkFp8F32Op::Properties>().wordSel = wordSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getF32Type();
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcAOperands, odsBuildableType0, srcAOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcBOperands, odsBuildableType0, srcBOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(oldOperands, odsBuildableType1, oldOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkFp8F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("wordSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrcA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrcB();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOld();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getWordSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkFp8F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkFp8F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkRtz definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkRtzGenericAdaptorBase::CvtPkRtzGenericAdaptorBase(CvtPkRtz op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtPkRtzAdaptor::CvtPkRtzAdaptor(CvtPkRtz op) : CvtPkRtzGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkRtzAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkRtz::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtPkRtz::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkRtz::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtPkRtz::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtPkRtz::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtPkRtz::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtPkRtz::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtPkRtz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addTypes(res);
}

CvtPkRtz CvtPkRtz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, srcA, srcB);
  auto __res__ = ::llvm::dyn_cast<CvtPkRtz>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkRtz CvtPkRtz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB) {
  return create(builder, builder.getLoc(), res, srcA, srcB);
}

void CvtPkRtz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkRtz CvtPkRtz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, srcA, srcB);
  auto __res__ = ::llvm::dyn_cast<CvtPkRtz>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkRtz CvtPkRtz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB) {
  return create(builder, builder.getLoc(), resultTypes, srcA, srcB);
}

void CvtPkRtz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkRtz CvtPkRtz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkRtz>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkRtz CvtPkRtz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkRtz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkRtz CvtPkRtz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkRtz>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkRtz CvtPkRtz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkRtz::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkRtz::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkRtz::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcARawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcAOperands(&srcARawOperand, 1);  ::llvm::SMLoc srcAOperandsLoc;
  (void)srcAOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand srcBRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcBOperands(&srcBRawOperand, 1);  ::llvm::SMLoc srcBOperandsLoc;
  (void)srcBOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcAOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcARawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  srcBOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcBRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcAOperands, odsBuildableType0, srcAOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcBOperands, odsBuildableType0, srcBOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkRtz::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrcA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrcB();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkRtz::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkRtz)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk16Bf16Bf6Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk16Bf16Bf6OpGenericAdaptorBase::CvtPkScalePk16Bf16Bf6OpGenericAdaptorBase(CvtPkScalePk16Bf16Bf6Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk16Bf16Bf6OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk16Bf16Bf6OpAdaptor::CvtPkScalePk16Bf16Bf6OpAdaptor(CvtPkScalePk16Bf16Bf6Op op) : CvtPkScalePk16Bf16Bf6OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk16Bf16Bf6OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk16.bf16.bf6' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk16.bf16.bf6' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16Bf16Bf6Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk16Bf16Bf6Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk16Bf16Bf6Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk16Bf16Bf6Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk16Bf16Bf6Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk16Bf16Bf6Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk16Bf16Bf6Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16Bf16Bf6Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk16Bf16Bf6Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk16Bf16Bf6Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk16Bf16Bf6Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk16Bf16Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk16Bf16Bf6Op CvtPkScalePk16Bf16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16Bf16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16Bf16Bf6Op CvtPkScalePk16Bf16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk16Bf16Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16Bf16Bf6Op CvtPkScalePk16Bf16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16Bf16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16Bf16Bf6Op CvtPkScalePk16Bf16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk16Bf16Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk16Bf16Bf6Op CvtPkScalePk16Bf16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16Bf16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16Bf16Bf6Op CvtPkScalePk16Bf16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk16Bf16Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16Bf16Bf6Op CvtPkScalePk16Bf16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16Bf16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16Bf16Bf6Op CvtPkScalePk16Bf16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk16Bf16Bf6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk16Bf16Bf6Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk16Bf16Bf6Op CvtPkScalePk16Bf16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16Bf16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16Bf16Bf6Op CvtPkScalePk16Bf16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk16Bf16Bf6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16Bf16Bf6Op CvtPkScalePk16Bf16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16Bf16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16Bf16Bf6Op CvtPkScalePk16Bf16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk16Bf16Bf6Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps7(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16Bf16Bf6Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk16Bf16Bf6Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk16Bf16Bf6Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({3} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk16Bf16Bf6Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk16Bf16Bf6Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk16Bf16Bf6Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk16Bf16Fp6Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk16Bf16Fp6OpGenericAdaptorBase::CvtPkScalePk16Bf16Fp6OpGenericAdaptorBase(CvtPkScalePk16Bf16Fp6Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk16Bf16Fp6OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk16Bf16Fp6OpAdaptor::CvtPkScalePk16Bf16Fp6OpAdaptor(CvtPkScalePk16Bf16Fp6Op op) : CvtPkScalePk16Bf16Fp6OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk16Bf16Fp6OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk16.bf16.fp6' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk16.bf16.fp6' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16Bf16Fp6Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk16Bf16Fp6Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk16Bf16Fp6Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk16Bf16Fp6Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk16Bf16Fp6Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk16Bf16Fp6Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk16Bf16Fp6Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16Bf16Fp6Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk16Bf16Fp6Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk16Bf16Fp6Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk16Bf16Fp6Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk16Bf16Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk16Bf16Fp6Op CvtPkScalePk16Bf16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16Bf16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16Bf16Fp6Op CvtPkScalePk16Bf16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk16Bf16Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16Bf16Fp6Op CvtPkScalePk16Bf16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16Bf16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16Bf16Fp6Op CvtPkScalePk16Bf16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk16Bf16Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk16Bf16Fp6Op CvtPkScalePk16Bf16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16Bf16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16Bf16Fp6Op CvtPkScalePk16Bf16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk16Bf16Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16Bf16Fp6Op CvtPkScalePk16Bf16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16Bf16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16Bf16Fp6Op CvtPkScalePk16Bf16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk16Bf16Fp6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk16Bf16Fp6Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk16Bf16Fp6Op CvtPkScalePk16Bf16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16Bf16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16Bf16Fp6Op CvtPkScalePk16Bf16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk16Bf16Fp6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16Bf16Fp6Op CvtPkScalePk16Bf16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16Bf16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16Bf16Fp6Op CvtPkScalePk16Bf16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk16Bf16Fp6Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps7(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16Bf16Fp6Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk16Bf16Fp6Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk16Bf16Fp6Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({3} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk16Bf16Fp6Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk16Bf16Fp6Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk16Bf16Fp6Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk16F16Bf6Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk16F16Bf6OpGenericAdaptorBase::CvtPkScalePk16F16Bf6OpGenericAdaptorBase(CvtPkScalePk16F16Bf6Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk16F16Bf6OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk16F16Bf6OpAdaptor::CvtPkScalePk16F16Bf6OpAdaptor(CvtPkScalePk16F16Bf6Op op) : CvtPkScalePk16F16Bf6OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk16F16Bf6OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk16.f16.bf6' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk16.f16.bf6' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16F16Bf6Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk16F16Bf6Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk16F16Bf6Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk16F16Bf6Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk16F16Bf6Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk16F16Bf6Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk16F16Bf6Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16F16Bf6Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk16F16Bf6Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk16F16Bf6Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk16F16Bf6Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk16F16Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk16F16Bf6Op CvtPkScalePk16F16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F16Bf6Op CvtPkScalePk16F16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk16F16Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16F16Bf6Op CvtPkScalePk16F16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F16Bf6Op CvtPkScalePk16F16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk16F16Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk16F16Bf6Op CvtPkScalePk16F16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F16Bf6Op CvtPkScalePk16F16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk16F16Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16F16Bf6Op CvtPkScalePk16F16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F16Bf6Op CvtPkScalePk16F16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk16F16Bf6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk16F16Bf6Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk16F16Bf6Op CvtPkScalePk16F16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F16Bf6Op CvtPkScalePk16F16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk16F16Bf6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16F16Bf6Op CvtPkScalePk16F16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F16Bf6Op CvtPkScalePk16F16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk16F16Bf6Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps8(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16F16Bf6Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk16F16Bf6Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk16F16Bf6Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({3} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk16F16Bf6Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk16F16Bf6Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk16F16Bf6Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk16F16Fp6Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk16F16Fp6OpGenericAdaptorBase::CvtPkScalePk16F16Fp6OpGenericAdaptorBase(CvtPkScalePk16F16Fp6Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk16F16Fp6OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk16F16Fp6OpAdaptor::CvtPkScalePk16F16Fp6OpAdaptor(CvtPkScalePk16F16Fp6Op op) : CvtPkScalePk16F16Fp6OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk16F16Fp6OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk16.f16.fp6' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk16.f16.fp6' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16F16Fp6Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk16F16Fp6Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk16F16Fp6Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk16F16Fp6Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk16F16Fp6Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk16F16Fp6Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk16F16Fp6Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16F16Fp6Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk16F16Fp6Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk16F16Fp6Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk16F16Fp6Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk16F16Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk16F16Fp6Op CvtPkScalePk16F16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F16Fp6Op CvtPkScalePk16F16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk16F16Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16F16Fp6Op CvtPkScalePk16F16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F16Fp6Op CvtPkScalePk16F16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk16F16Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk16F16Fp6Op CvtPkScalePk16F16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F16Fp6Op CvtPkScalePk16F16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk16F16Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16F16Fp6Op CvtPkScalePk16F16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F16Fp6Op CvtPkScalePk16F16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk16F16Fp6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk16F16Fp6Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk16F16Fp6Op CvtPkScalePk16F16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F16Fp6Op CvtPkScalePk16F16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk16F16Fp6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16F16Fp6Op CvtPkScalePk16F16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F16Fp6Op CvtPkScalePk16F16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk16F16Fp6Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps8(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16F16Fp6Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk16F16Fp6Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk16F16Fp6Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({3} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk16F16Fp6Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk16F16Fp6Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk16F16Fp6Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk16F32Bf6Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk16F32Bf6OpGenericAdaptorBase::CvtPkScalePk16F32Bf6OpGenericAdaptorBase(CvtPkScalePk16F32Bf6Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk16F32Bf6OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk16F32Bf6OpAdaptor::CvtPkScalePk16F32Bf6OpAdaptor(CvtPkScalePk16F32Bf6Op op) : CvtPkScalePk16F32Bf6OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk16F32Bf6OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk16.f32.bf6' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk16.f32.bf6' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16F32Bf6Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk16F32Bf6Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk16F32Bf6Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk16F32Bf6Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk16F32Bf6Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk16F32Bf6Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk16F32Bf6Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16F32Bf6Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk16F32Bf6Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk16F32Bf6Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk16F32Bf6Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk16F32Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk16F32Bf6Op CvtPkScalePk16F32Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F32Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F32Bf6Op CvtPkScalePk16F32Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk16F32Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16F32Bf6Op CvtPkScalePk16F32Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F32Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F32Bf6Op CvtPkScalePk16F32Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk16F32Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk16F32Bf6Op CvtPkScalePk16F32Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F32Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F32Bf6Op CvtPkScalePk16F32Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk16F32Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16F32Bf6Op CvtPkScalePk16F32Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F32Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F32Bf6Op CvtPkScalePk16F32Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk16F32Bf6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk16F32Bf6Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk16F32Bf6Op CvtPkScalePk16F32Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F32Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F32Bf6Op CvtPkScalePk16F32Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk16F32Bf6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16F32Bf6Op CvtPkScalePk16F32Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F32Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F32Bf6Op CvtPkScalePk16F32Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk16F32Bf6Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps9(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16F32Bf6Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk16F32Bf6Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk16F32Bf6Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({3} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk16F32Bf6Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk16F32Bf6Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk16F32Bf6Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk16F32Fp6Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk16F32Fp6OpGenericAdaptorBase::CvtPkScalePk16F32Fp6OpGenericAdaptorBase(CvtPkScalePk16F32Fp6Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk16F32Fp6OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk16F32Fp6OpAdaptor::CvtPkScalePk16F32Fp6OpAdaptor(CvtPkScalePk16F32Fp6Op op) : CvtPkScalePk16F32Fp6OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk16F32Fp6OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk16.f32.fp6' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk16.f32.fp6' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16F32Fp6Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk16F32Fp6Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk16F32Fp6Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk16F32Fp6Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk16F32Fp6Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk16F32Fp6Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk16F32Fp6Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16F32Fp6Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk16F32Fp6Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk16F32Fp6Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk16F32Fp6Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk16F32Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk16F32Fp6Op CvtPkScalePk16F32Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F32Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F32Fp6Op CvtPkScalePk16F32Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk16F32Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16F32Fp6Op CvtPkScalePk16F32Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F32Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F32Fp6Op CvtPkScalePk16F32Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk16F32Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk16F32Fp6Op CvtPkScalePk16F32Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F32Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F32Fp6Op CvtPkScalePk16F32Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk16F32Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16F32Fp6Op CvtPkScalePk16F32Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F32Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F32Fp6Op CvtPkScalePk16F32Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk16F32Fp6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk16F32Fp6Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk16F32Fp6Op CvtPkScalePk16F32Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F32Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F32Fp6Op CvtPkScalePk16F32Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk16F32Fp6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk16F32Fp6Op CvtPkScalePk16F32Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk16F32Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk16F32Fp6Op CvtPkScalePk16F32Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk16F32Fp6Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps9(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk16F32Fp6Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk16F32Fp6Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk16F32Fp6Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({3} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk16F32Fp6Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk16F32Fp6Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk16F32Fp6Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk8Bf16Bf8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk8Bf16Bf8OpGenericAdaptorBase::CvtPkScalePk8Bf16Bf8OpGenericAdaptorBase(CvtPkScalePk8Bf16Bf8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk8Bf16Bf8OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk8Bf16Bf8OpAdaptor::CvtPkScalePk8Bf16Bf8OpAdaptor(CvtPkScalePk8Bf16Bf8Op op) : CvtPkScalePk8Bf16Bf8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk8Bf16Bf8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk8.bf16.bf8' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk8.bf16.bf8' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8Bf16Bf8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk8Bf16Bf8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk8Bf16Bf8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk8Bf16Bf8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk8Bf16Bf8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk8Bf16Bf8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk8Bf16Bf8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8Bf16Bf8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8Bf16Bf8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk8Bf16Bf8Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk8Bf16Bf8Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk8Bf16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk8Bf16Bf8Op CvtPkScalePk8Bf16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Bf8Op CvtPkScalePk8Bf16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8Bf16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8Bf16Bf8Op CvtPkScalePk8Bf16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Bf8Op CvtPkScalePk8Bf16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8Bf16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk8Bf16Bf8Op CvtPkScalePk8Bf16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Bf8Op CvtPkScalePk8Bf16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8Bf16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8Bf16Bf8Op CvtPkScalePk8Bf16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Bf8Op CvtPkScalePk8Bf16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8Bf16Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk8Bf16Bf8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk8Bf16Bf8Op CvtPkScalePk8Bf16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Bf8Op CvtPkScalePk8Bf16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk8Bf16Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8Bf16Bf8Op CvtPkScalePk8Bf16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Bf8Op CvtPkScalePk8Bf16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk8Bf16Bf8Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps11(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8Bf16Bf8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk8Bf16Bf8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk8Bf16Bf8Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({2} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8Bf16Bf8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk8Bf16Bf8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk8Bf16Bf8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk8Bf16Fp4Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk8Bf16Fp4OpGenericAdaptorBase::CvtPkScalePk8Bf16Fp4OpGenericAdaptorBase(CvtPkScalePk8Bf16Fp4Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk8Bf16Fp4OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk8Bf16Fp4OpAdaptor::CvtPkScalePk8Bf16Fp4OpAdaptor(CvtPkScalePk8Bf16Fp4Op op) : CvtPkScalePk8Bf16Fp4OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk8Bf16Fp4OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk8.bf16.fp4' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk8.bf16.fp4' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8Bf16Fp4Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk8Bf16Fp4Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk8Bf16Fp4Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk8Bf16Fp4Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk8Bf16Fp4Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk8Bf16Fp4Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk8Bf16Fp4Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8Bf16Fp4Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8Bf16Fp4Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk8Bf16Fp4Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk8Bf16Fp4Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk8Bf16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk8Bf16Fp4Op CvtPkScalePk8Bf16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Fp4Op CvtPkScalePk8Bf16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8Bf16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8Bf16Fp4Op CvtPkScalePk8Bf16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Fp4Op CvtPkScalePk8Bf16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8Bf16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk8Bf16Fp4Op CvtPkScalePk8Bf16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Fp4Op CvtPkScalePk8Bf16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8Bf16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8Bf16Fp4Op CvtPkScalePk8Bf16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Fp4Op CvtPkScalePk8Bf16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8Bf16Fp4Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk8Bf16Fp4Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk8Bf16Fp4Op CvtPkScalePk8Bf16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Fp4Op CvtPkScalePk8Bf16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk8Bf16Fp4Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8Bf16Fp4Op CvtPkScalePk8Bf16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Fp4Op CvtPkScalePk8Bf16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk8Bf16Fp4Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps11(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8Bf16Fp4Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk8Bf16Fp4Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk8Bf16Fp4Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType0, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8Bf16Fp4Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk8Bf16Fp4Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk8Bf16Fp4Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk8Bf16Fp8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk8Bf16Fp8OpGenericAdaptorBase::CvtPkScalePk8Bf16Fp8OpGenericAdaptorBase(CvtPkScalePk8Bf16Fp8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk8Bf16Fp8OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk8Bf16Fp8OpAdaptor::CvtPkScalePk8Bf16Fp8OpAdaptor(CvtPkScalePk8Bf16Fp8Op op) : CvtPkScalePk8Bf16Fp8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk8Bf16Fp8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk8.bf16.fp8' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk8.bf16.fp8' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8Bf16Fp8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk8Bf16Fp8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk8Bf16Fp8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk8Bf16Fp8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk8Bf16Fp8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk8Bf16Fp8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk8Bf16Fp8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8Bf16Fp8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8Bf16Fp8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk8Bf16Fp8Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk8Bf16Fp8Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk8Bf16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk8Bf16Fp8Op CvtPkScalePk8Bf16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Fp8Op CvtPkScalePk8Bf16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8Bf16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8Bf16Fp8Op CvtPkScalePk8Bf16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Fp8Op CvtPkScalePk8Bf16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8Bf16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk8Bf16Fp8Op CvtPkScalePk8Bf16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Fp8Op CvtPkScalePk8Bf16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8Bf16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8Bf16Fp8Op CvtPkScalePk8Bf16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Fp8Op CvtPkScalePk8Bf16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8Bf16Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk8Bf16Fp8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk8Bf16Fp8Op CvtPkScalePk8Bf16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Fp8Op CvtPkScalePk8Bf16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk8Bf16Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8Bf16Fp8Op CvtPkScalePk8Bf16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8Bf16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8Bf16Fp8Op CvtPkScalePk8Bf16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk8Bf16Fp8Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps11(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8Bf16Fp8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk8Bf16Fp8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk8Bf16Fp8Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({2} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8Bf16Fp8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk8Bf16Fp8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk8Bf16Fp8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk8F16Bf8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk8F16Bf8OpGenericAdaptorBase::CvtPkScalePk8F16Bf8OpGenericAdaptorBase(CvtPkScalePk8F16Bf8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk8F16Bf8OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk8F16Bf8OpAdaptor::CvtPkScalePk8F16Bf8OpAdaptor(CvtPkScalePk8F16Bf8Op op) : CvtPkScalePk8F16Bf8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk8F16Bf8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk8.f16.bf8' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk8.f16.bf8' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F16Bf8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk8F16Bf8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk8F16Bf8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk8F16Bf8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk8F16Bf8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk8F16Bf8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk8F16Bf8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F16Bf8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8F16Bf8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk8F16Bf8Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk8F16Bf8Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk8F16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk8F16Bf8Op CvtPkScalePk8F16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Bf8Op CvtPkScalePk8F16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8F16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F16Bf8Op CvtPkScalePk8F16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Bf8Op CvtPkScalePk8F16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8F16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk8F16Bf8Op CvtPkScalePk8F16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Bf8Op CvtPkScalePk8F16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8F16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F16Bf8Op CvtPkScalePk8F16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Bf8Op CvtPkScalePk8F16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8F16Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk8F16Bf8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk8F16Bf8Op CvtPkScalePk8F16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Bf8Op CvtPkScalePk8F16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk8F16Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F16Bf8Op CvtPkScalePk8F16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Bf8Op CvtPkScalePk8F16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk8F16Bf8Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps12(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F16Bf8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk8F16Bf8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk8F16Bf8Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({2} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8F16Bf8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk8F16Bf8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk8F16Bf8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk8F16Fp4Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk8F16Fp4OpGenericAdaptorBase::CvtPkScalePk8F16Fp4OpGenericAdaptorBase(CvtPkScalePk8F16Fp4Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk8F16Fp4OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk8F16Fp4OpAdaptor::CvtPkScalePk8F16Fp4OpAdaptor(CvtPkScalePk8F16Fp4Op op) : CvtPkScalePk8F16Fp4OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk8F16Fp4OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk8.f16.fp4' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk8.f16.fp4' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F16Fp4Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk8F16Fp4Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk8F16Fp4Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk8F16Fp4Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk8F16Fp4Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk8F16Fp4Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk8F16Fp4Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F16Fp4Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8F16Fp4Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk8F16Fp4Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk8F16Fp4Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk8F16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk8F16Fp4Op CvtPkScalePk8F16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Fp4Op CvtPkScalePk8F16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8F16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F16Fp4Op CvtPkScalePk8F16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Fp4Op CvtPkScalePk8F16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8F16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk8F16Fp4Op CvtPkScalePk8F16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Fp4Op CvtPkScalePk8F16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8F16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F16Fp4Op CvtPkScalePk8F16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Fp4Op CvtPkScalePk8F16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8F16Fp4Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk8F16Fp4Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk8F16Fp4Op CvtPkScalePk8F16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Fp4Op CvtPkScalePk8F16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk8F16Fp4Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F16Fp4Op CvtPkScalePk8F16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Fp4Op CvtPkScalePk8F16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk8F16Fp4Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps12(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F16Fp4Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk8F16Fp4Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk8F16Fp4Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType0, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8F16Fp4Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk8F16Fp4Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk8F16Fp4Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk8F16Fp8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk8F16Fp8OpGenericAdaptorBase::CvtPkScalePk8F16Fp8OpGenericAdaptorBase(CvtPkScalePk8F16Fp8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk8F16Fp8OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk8F16Fp8OpAdaptor::CvtPkScalePk8F16Fp8OpAdaptor(CvtPkScalePk8F16Fp8Op op) : CvtPkScalePk8F16Fp8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk8F16Fp8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk8.f16.fp8' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk8.f16.fp8' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F16Fp8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk8F16Fp8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk8F16Fp8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk8F16Fp8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk8F16Fp8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk8F16Fp8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk8F16Fp8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F16Fp8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8F16Fp8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk8F16Fp8Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk8F16Fp8Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk8F16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk8F16Fp8Op CvtPkScalePk8F16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Fp8Op CvtPkScalePk8F16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8F16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F16Fp8Op CvtPkScalePk8F16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Fp8Op CvtPkScalePk8F16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8F16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk8F16Fp8Op CvtPkScalePk8F16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Fp8Op CvtPkScalePk8F16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8F16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F16Fp8Op CvtPkScalePk8F16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Fp8Op CvtPkScalePk8F16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8F16Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk8F16Fp8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk8F16Fp8Op CvtPkScalePk8F16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Fp8Op CvtPkScalePk8F16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk8F16Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F16Fp8Op CvtPkScalePk8F16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F16Fp8Op CvtPkScalePk8F16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk8F16Fp8Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps12(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F16Fp8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk8F16Fp8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk8F16Fp8Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({2} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8F16Fp8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk8F16Fp8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk8F16Fp8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk8F32Bf8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk8F32Bf8OpGenericAdaptorBase::CvtPkScalePk8F32Bf8OpGenericAdaptorBase(CvtPkScalePk8F32Bf8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk8F32Bf8OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk8F32Bf8OpAdaptor::CvtPkScalePk8F32Bf8OpAdaptor(CvtPkScalePk8F32Bf8Op op) : CvtPkScalePk8F32Bf8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk8F32Bf8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk8.f32.bf8' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk8.f32.bf8' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F32Bf8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk8F32Bf8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk8F32Bf8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk8F32Bf8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk8F32Bf8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk8F32Bf8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk8F32Bf8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F32Bf8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8F32Bf8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk8F32Bf8Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk8F32Bf8Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk8F32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk8F32Bf8Op CvtPkScalePk8F32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Bf8Op CvtPkScalePk8F32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8F32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F32Bf8Op CvtPkScalePk8F32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Bf8Op CvtPkScalePk8F32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8F32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk8F32Bf8Op CvtPkScalePk8F32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Bf8Op CvtPkScalePk8F32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8F32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F32Bf8Op CvtPkScalePk8F32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Bf8Op CvtPkScalePk8F32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8F32Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk8F32Bf8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk8F32Bf8Op CvtPkScalePk8F32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Bf8Op CvtPkScalePk8F32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk8F32Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F32Bf8Op CvtPkScalePk8F32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Bf8Op CvtPkScalePk8F32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk8F32Bf8Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps13(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F32Bf8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk8F32Bf8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk8F32Bf8Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({2} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8F32Bf8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk8F32Bf8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk8F32Bf8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk8F32Fp4Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk8F32Fp4OpGenericAdaptorBase::CvtPkScalePk8F32Fp4OpGenericAdaptorBase(CvtPkScalePk8F32Fp4Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk8F32Fp4OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk8F32Fp4OpAdaptor::CvtPkScalePk8F32Fp4OpAdaptor(CvtPkScalePk8F32Fp4Op op) : CvtPkScalePk8F32Fp4OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk8F32Fp4OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk8.f32.fp4' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk8.f32.fp4' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F32Fp4Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk8F32Fp4Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk8F32Fp4Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk8F32Fp4Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk8F32Fp4Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk8F32Fp4Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk8F32Fp4Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F32Fp4Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8F32Fp4Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk8F32Fp4Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk8F32Fp4Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk8F32Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk8F32Fp4Op CvtPkScalePk8F32Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Fp4Op CvtPkScalePk8F32Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8F32Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F32Fp4Op CvtPkScalePk8F32Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Fp4Op CvtPkScalePk8F32Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8F32Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk8F32Fp4Op CvtPkScalePk8F32Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Fp4Op CvtPkScalePk8F32Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8F32Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F32Fp4Op CvtPkScalePk8F32Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Fp4Op CvtPkScalePk8F32Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8F32Fp4Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk8F32Fp4Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk8F32Fp4Op CvtPkScalePk8F32Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Fp4Op CvtPkScalePk8F32Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk8F32Fp4Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F32Fp4Op CvtPkScalePk8F32Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Fp4Op CvtPkScalePk8F32Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk8F32Fp4Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps13(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F32Fp4Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk8F32Fp4Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk8F32Fp4Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType0, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8F32Fp4Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk8F32Fp4Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk8F32Fp4Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtPkScalePk8F32Fp8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtPkScalePk8F32Fp8OpGenericAdaptorBase::CvtPkScalePk8F32Fp8OpGenericAdaptorBase(CvtPkScalePk8F32Fp8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtPkScalePk8F32Fp8OpGenericAdaptorBase::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtPkScalePk8F32Fp8OpAdaptor::CvtPkScalePk8F32Fp8OpAdaptor(CvtPkScalePk8F32Fp8Op op) : CvtPkScalePk8F32Fp8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtPkScalePk8F32Fp8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitError(loc, "'rocdl.cvt.scale.pk8.f32.fp8' op requires attribute 'scaleSel'");

  if (tblgen_scaleSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scale.pk8.f32.fp8' op attribute 'scaleSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F32Fp8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.scaleSel;
       auto attr = dict.get("scaleSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtPkScalePk8F32Fp8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.scaleSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtPkScalePk8F32Fp8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.scaleSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtPkScalePk8F32Fp8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "scaleSel")
      return prop.scaleSel;
  return std::nullopt;
}

void CvtPkScalePk8F32Fp8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "scaleSel") {
       prop.scaleSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleSel)>>(value);
       return;
    }
}

void CvtPkScalePk8F32Fp8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.scaleSel) attrs.append("scaleSel", prop.scaleSel);
}

::llvm::LogicalResult CvtPkScalePk8F32Fp8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getScaleSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F32Fp8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.scaleSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8F32Fp8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.scaleSel);
}

uint32_t CvtPkScalePk8F32Fp8Op::getScaleSel() {
  auto attr = getScaleSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtPkScalePk8F32Fp8Op::setScaleSel(uint32_t attrValue) {
  getProperties().scaleSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtPkScalePk8F32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  odsState.addTypes(res);
}

CvtPkScalePk8F32Fp8Op CvtPkScalePk8F32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Fp8Op CvtPkScalePk8F32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8F32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = scaleSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F32Fp8Op CvtPkScalePk8F32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Fp8Op CvtPkScalePk8F32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8F32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  odsState.addTypes(res);
}

CvtPkScalePk8F32Fp8Op CvtPkScalePk8F32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Fp8Op CvtPkScalePk8F32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), res, src, scale, scaleSel);
}

void CvtPkScalePk8F32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().scaleSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F32Fp8Op CvtPkScalePk8F32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, scaleSel);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Fp8Op CvtPkScalePk8F32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t scaleSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, scaleSel);
}

void CvtPkScalePk8F32Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtPkScalePk8F32Fp8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtPkScalePk8F32Fp8Op CvtPkScalePk8F32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Fp8Op CvtPkScalePk8F32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtPkScalePk8F32Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtPkScalePk8F32Fp8Op CvtPkScalePk8F32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtPkScalePk8F32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtPkScalePk8F32Fp8Op CvtPkScalePk8F32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtPkScalePk8F32Fp8Op::verifyInvariantsImpl() {
  auto tblgen_scaleSel = getProperties().scaleSel; (void)tblgen_scaleSel;
  if (!tblgen_scaleSel) return emitOpError("requires attribute 'scaleSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleSel, "scaleSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps13(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtPkScalePk8F32Fp8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtPkScalePk8F32Fp8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::IntegerAttr scaleSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(scaleSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (scaleSelAttr) result.getOrAddProperties<CvtPkScalePk8F32Fp8Op::Properties>().scaleSel = scaleSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({2} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtPkScalePk8F32Fp8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("scaleSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getScaleSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtPkScalePk8F32Fp8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtPkScalePk8F32Fp8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF322xPk16Bf6F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF322xPk16Bf6F32OpGenericAdaptorBase::CvtScaleF322xPk16Bf6F32OpGenericAdaptorBase(CvtScaleF322xPk16Bf6F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF322xPk16Bf6F32OpAdaptor::CvtScaleF322xPk16Bf6F32OpAdaptor(CvtScaleF322xPk16Bf6F32Op op) : CvtScaleF322xPk16Bf6F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF322xPk16Bf6F32OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF322xPk16Bf6F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF322xPk16Bf6F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF322xPk16Bf6F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF322xPk16Bf6F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF322xPk16Bf6F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF322xPk16Bf6F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF322xPk16Bf6F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF322xPk16Bf6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale) {
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF322xPk16Bf6F32Op CvtScaleF322xPk16Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src0, src1, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF322xPk16Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF322xPk16Bf6F32Op CvtScaleF322xPk16Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src0, src1, scale);
}

void CvtScaleF322xPk16Bf6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale) {
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF322xPk16Bf6F32Op CvtScaleF322xPk16Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src0, src1, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF322xPk16Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF322xPk16Bf6F32Op CvtScaleF322xPk16Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src0, src1, scale);
}

void CvtScaleF322xPk16Bf6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF322xPk16Bf6F32Op CvtScaleF322xPk16Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF322xPk16Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF322xPk16Bf6F32Op CvtScaleF322xPk16Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF322xPk16Bf6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF322xPk16Bf6F32Op CvtScaleF322xPk16Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF322xPk16Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF322xPk16Bf6F32Op CvtScaleF322xPk16Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF322xPk16Bf6F32Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps9(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps9(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF322xPk16Bf6F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF322xPk16Bf6F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand src1RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src1Operands(&src1RawOperand, 1);  ::llvm::SMLoc src1OperandsLoc;
  (void)src1OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  src1OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src1RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({16} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(src0Operands, odsBuildableType0, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src1Operands, odsBuildableType0, src1OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF322xPk16Bf6F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc1();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF322xPk16Bf6F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF322xPk16Bf6F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF322xPk16Fp6F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF322xPk16Fp6F32OpGenericAdaptorBase::CvtScaleF322xPk16Fp6F32OpGenericAdaptorBase(CvtScaleF322xPk16Fp6F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF322xPk16Fp6F32OpAdaptor::CvtScaleF322xPk16Fp6F32OpAdaptor(CvtScaleF322xPk16Fp6F32Op op) : CvtScaleF322xPk16Fp6F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF322xPk16Fp6F32OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF322xPk16Fp6F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF322xPk16Fp6F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF322xPk16Fp6F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF322xPk16Fp6F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF322xPk16Fp6F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF322xPk16Fp6F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF322xPk16Fp6F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF322xPk16Fp6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale) {
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF322xPk16Fp6F32Op CvtScaleF322xPk16Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src0, src1, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF322xPk16Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF322xPk16Fp6F32Op CvtScaleF322xPk16Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src0, src1, scale);
}

void CvtScaleF322xPk16Fp6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale) {
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF322xPk16Fp6F32Op CvtScaleF322xPk16Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src0, src1, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF322xPk16Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF322xPk16Fp6F32Op CvtScaleF322xPk16Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src0, src1, scale);
}

void CvtScaleF322xPk16Fp6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF322xPk16Fp6F32Op CvtScaleF322xPk16Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF322xPk16Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF322xPk16Fp6F32Op CvtScaleF322xPk16Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF322xPk16Fp6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF322xPk16Fp6F32Op CvtScaleF322xPk16Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF322xPk16Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF322xPk16Fp6F32Op CvtScaleF322xPk16Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF322xPk16Fp6F32Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps9(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps9(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF322xPk16Fp6F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF322xPk16Fp6F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand src1RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src1Operands(&src1RawOperand, 1);  ::llvm::SMLoc src1OperandsLoc;
  (void)src1OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  src1OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src1RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({16} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(src0Operands, odsBuildableType0, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src1Operands, odsBuildableType0, src1OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF322xPk16Fp6F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc1();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF322xPk16Fp6F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF322xPk16Fp6F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32F16Bf8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32F16Bf8OpGenericAdaptorBase::CvtScaleF32F16Bf8OpGenericAdaptorBase(CvtScaleF32F16Bf8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32F16Bf8OpGenericAdaptorBase::getSrcSelIndex() {
  auto attr = getSrcSelIndexAttr();
  return attr.getValue().getZExtValue();
}

bool CvtScaleF32F16Bf8OpGenericAdaptorBase::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32F16Bf8OpAdaptor::CvtScaleF32F16Bf8OpAdaptor(CvtScaleF32F16Bf8Op op) : CvtScaleF32F16Bf8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32F16Bf8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitError(loc, "'rocdl.cvt.scalef32.f16.bf8' op requires attribute 'dstLoHiSel'");
  auto tblgen_srcSelIndex = getProperties().srcSelIndex; (void)tblgen_srcSelIndex;
  if (!tblgen_srcSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.f16.bf8' op requires attribute 'srcSelIndex'");

  if (tblgen_srcSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_srcSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_srcSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.f16.bf8' op attribute 'srcSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_dstLoHiSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstLoHiSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstLoHiSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.scalef32.f16.bf8' op attribute 'dstLoHiSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32F16Bf8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstLoHiSel;
       auto attr = dict.get("dstLoHiSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstLoHiSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.srcSelIndex;
       auto attr = dict.get("srcSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `srcSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32F16Bf8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstLoHiSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstLoHiSel",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.srcSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("srcSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32F16Bf8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstLoHiSel.getAsOpaquePointer()), 
    llvm::hash_value(prop.srcSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32F16Bf8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstLoHiSel")
      return prop.dstLoHiSel;

    if (name == "srcSelIndex")
      return prop.srcSelIndex;
  return std::nullopt;
}

void CvtScaleF32F16Bf8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstLoHiSel") {
       prop.dstLoHiSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstLoHiSel)>>(value);
       return;
    }

    if (name == "srcSelIndex") {
       prop.srcSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.srcSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32F16Bf8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstLoHiSel) attrs.append("dstLoHiSel", prop.dstLoHiSel);

    if (prop.srcSelIndex) attrs.append("srcSelIndex", prop.srcSelIndex);
}

::llvm::LogicalResult CvtScaleF32F16Bf8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstLoHiSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "dstLoHiSel", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSrcSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "srcSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32F16Bf8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstLoHiSel)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.srcSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32F16Bf8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstLoHiSel);
  writer.writeAttribute(prop.srcSelIndex);
}

uint32_t CvtScaleF32F16Bf8Op::getSrcSelIndex() {
  auto attr = getSrcSelIndexAttr();
  return attr.getValue().getZExtValue();
}

bool CvtScaleF32F16Bf8Op::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32F16Bf8Op::setSrcSelIndex(uint32_t attrValue) {
  getProperties().srcSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32F16Bf8Op::setDstLoHiSel(bool attrValue) {
  getProperties().dstLoHiSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtScaleF32F16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = srcSelIndex;
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  odsState.addTypes(res);
}

CvtScaleF32F16Bf8Op CvtScaleF32F16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F16Bf8Op CvtScaleF32F16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
}

void CvtScaleF32F16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = srcSelIndex;
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32F16Bf8Op CvtScaleF32F16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F16Bf8Op CvtScaleF32F16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
}

void CvtScaleF32F16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), srcSelIndex);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  odsState.addTypes(res);
}

CvtScaleF32F16Bf8Op CvtScaleF32F16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F16Bf8Op CvtScaleF32F16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
}

void CvtScaleF32F16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), srcSelIndex);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32F16Bf8Op CvtScaleF32F16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F16Bf8Op CvtScaleF32F16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
}

void CvtScaleF32F16Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32F16Bf8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32F16Bf8Op CvtScaleF32F16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F16Bf8Op CvtScaleF32F16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32F16Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32F16Bf8Op CvtScaleF32F16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F16Bf8Op CvtScaleF32F16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32F16Bf8Op::verifyInvariantsImpl() {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitOpError("requires attribute 'dstLoHiSel'");
  auto tblgen_srcSelIndex = getProperties().srcSelIndex; (void)tblgen_srcSelIndex;
  if (!tblgen_srcSelIndex) return emitOpError("requires attribute 'srcSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_srcSelIndex, "srcSelIndex")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_dstLoHiSel, "dstLoHiSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps15(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps15(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32F16Bf8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32F16Bf8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr srcSelIndexAttr;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstLoHiSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(srcSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (srcSelIndexAttr) result.getOrAddProperties<CvtScaleF32F16Bf8Op::Properties>().srcSelIndex = srcSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstLoHiSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (dstLoHiSelAttr) result.getOrAddProperties<CvtScaleF32F16Bf8Op::Properties>().dstLoHiSel = dstLoHiSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({2} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcOperands, odsBuildableType1, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32F16Bf8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("srcSelIndex");
  elidedAttrs.push_back("dstLoHiSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getSrcSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstLoHiSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32F16Bf8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32F16Bf8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32F16Fp8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32F16Fp8OpGenericAdaptorBase::CvtScaleF32F16Fp8OpGenericAdaptorBase(CvtScaleF32F16Fp8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32F16Fp8OpGenericAdaptorBase::getSrcSelIndex() {
  auto attr = getSrcSelIndexAttr();
  return attr.getValue().getZExtValue();
}

bool CvtScaleF32F16Fp8OpGenericAdaptorBase::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32F16Fp8OpAdaptor::CvtScaleF32F16Fp8OpAdaptor(CvtScaleF32F16Fp8Op op) : CvtScaleF32F16Fp8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32F16Fp8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitError(loc, "'rocdl.cvt.scalef32.f16.fp8' op requires attribute 'dstLoHiSel'");
  auto tblgen_srcSelIndex = getProperties().srcSelIndex; (void)tblgen_srcSelIndex;
  if (!tblgen_srcSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.f16.fp8' op requires attribute 'srcSelIndex'");

  if (tblgen_srcSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_srcSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_srcSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.f16.fp8' op attribute 'srcSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_dstLoHiSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstLoHiSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstLoHiSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.scalef32.f16.fp8' op attribute 'dstLoHiSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32F16Fp8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstLoHiSel;
       auto attr = dict.get("dstLoHiSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstLoHiSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.srcSelIndex;
       auto attr = dict.get("srcSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `srcSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32F16Fp8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstLoHiSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstLoHiSel",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.srcSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("srcSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32F16Fp8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstLoHiSel.getAsOpaquePointer()), 
    llvm::hash_value(prop.srcSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32F16Fp8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstLoHiSel")
      return prop.dstLoHiSel;

    if (name == "srcSelIndex")
      return prop.srcSelIndex;
  return std::nullopt;
}

void CvtScaleF32F16Fp8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstLoHiSel") {
       prop.dstLoHiSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstLoHiSel)>>(value);
       return;
    }

    if (name == "srcSelIndex") {
       prop.srcSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.srcSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32F16Fp8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstLoHiSel) attrs.append("dstLoHiSel", prop.dstLoHiSel);

    if (prop.srcSelIndex) attrs.append("srcSelIndex", prop.srcSelIndex);
}

::llvm::LogicalResult CvtScaleF32F16Fp8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstLoHiSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "dstLoHiSel", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSrcSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "srcSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32F16Fp8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstLoHiSel)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.srcSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32F16Fp8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstLoHiSel);
  writer.writeAttribute(prop.srcSelIndex);
}

uint32_t CvtScaleF32F16Fp8Op::getSrcSelIndex() {
  auto attr = getSrcSelIndexAttr();
  return attr.getValue().getZExtValue();
}

bool CvtScaleF32F16Fp8Op::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32F16Fp8Op::setSrcSelIndex(uint32_t attrValue) {
  getProperties().srcSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32F16Fp8Op::setDstLoHiSel(bool attrValue) {
  getProperties().dstLoHiSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtScaleF32F16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = srcSelIndex;
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  odsState.addTypes(res);
}

CvtScaleF32F16Fp8Op CvtScaleF32F16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F16Fp8Op CvtScaleF32F16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
}

void CvtScaleF32F16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = srcSelIndex;
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32F16Fp8Op CvtScaleF32F16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F16Fp8Op CvtScaleF32F16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
}

void CvtScaleF32F16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), srcSelIndex);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  odsState.addTypes(res);
}

CvtScaleF32F16Fp8Op CvtScaleF32F16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F16Fp8Op CvtScaleF32F16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
}

void CvtScaleF32F16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), srcSelIndex);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32F16Fp8Op CvtScaleF32F16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F16Fp8Op CvtScaleF32F16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src, scale, srcSelIndex, dstLoHiSel);
}

void CvtScaleF32F16Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32F16Fp8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32F16Fp8Op CvtScaleF32F16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F16Fp8Op CvtScaleF32F16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32F16Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32F16Fp8Op CvtScaleF32F16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F16Fp8Op CvtScaleF32F16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32F16Fp8Op::verifyInvariantsImpl() {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitOpError("requires attribute 'dstLoHiSel'");
  auto tblgen_srcSelIndex = getProperties().srcSelIndex; (void)tblgen_srcSelIndex;
  if (!tblgen_srcSelIndex) return emitOpError("requires attribute 'srcSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_srcSelIndex, "srcSelIndex")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_dstLoHiSel, "dstLoHiSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps15(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps15(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32F16Fp8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32F16Fp8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr srcSelIndexAttr;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstLoHiSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(srcSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (srcSelIndexAttr) result.getOrAddProperties<CvtScaleF32F16Fp8Op::Properties>().srcSelIndex = srcSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstLoHiSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (dstLoHiSelAttr) result.getOrAddProperties<CvtScaleF32F16Fp8Op::Properties>().dstLoHiSel = dstLoHiSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({2} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcOperands, odsBuildableType1, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32F16Fp8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("srcSelIndex");
  elidedAttrs.push_back("dstLoHiSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getSrcSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstLoHiSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32F16Fp8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32F16Fp8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32F32Bf8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32F32Bf8OpGenericAdaptorBase::CvtScaleF32F32Bf8OpGenericAdaptorBase(CvtScaleF32F32Bf8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32F32Bf8OpGenericAdaptorBase::getSrcSelIndex() {
  auto attr = getSrcSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32F32Bf8OpAdaptor::CvtScaleF32F32Bf8OpAdaptor(CvtScaleF32F32Bf8Op op) : CvtScaleF32F32Bf8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32F32Bf8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_srcSelIndex = getProperties().srcSelIndex; (void)tblgen_srcSelIndex;
  if (!tblgen_srcSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.f32.bf8' op requires attribute 'srcSelIndex'");

  if (tblgen_srcSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_srcSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_srcSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.f32.bf8' op attribute 'srcSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32F32Bf8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.srcSelIndex;
       auto attr = dict.get("srcSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `srcSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32F32Bf8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.srcSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("srcSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32F32Bf8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.srcSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32F32Bf8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "srcSelIndex")
      return prop.srcSelIndex;
  return std::nullopt;
}

void CvtScaleF32F32Bf8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "srcSelIndex") {
       prop.srcSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.srcSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32F32Bf8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.srcSelIndex) attrs.append("srcSelIndex", prop.srcSelIndex);
}

::llvm::LogicalResult CvtScaleF32F32Bf8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getSrcSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "srcSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32F32Bf8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.srcSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32F32Bf8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.srcSelIndex);
}

uint32_t CvtScaleF32F32Bf8Op::getSrcSelIndex() {
  auto attr = getSrcSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32F32Bf8Op::setSrcSelIndex(uint32_t attrValue) {
  getProperties().srcSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32F32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = srcSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32F32Bf8Op CvtScaleF32F32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F32Bf8Op CvtScaleF32F32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  return create(builder, builder.getLoc(), res, src, scale, srcSelIndex);
}

void CvtScaleF32F32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = srcSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32F32Bf8Op CvtScaleF32F32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F32Bf8Op CvtScaleF32F32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcSelIndex);
}

void CvtScaleF32F32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), srcSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32F32Bf8Op CvtScaleF32F32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F32Bf8Op CvtScaleF32F32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  return create(builder, builder.getLoc(), res, src, scale, srcSelIndex);
}

void CvtScaleF32F32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), srcSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32F32Bf8Op CvtScaleF32F32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F32Bf8Op CvtScaleF32F32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcSelIndex);
}

void CvtScaleF32F32Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32F32Bf8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32F32Bf8Op CvtScaleF32F32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F32Bf8Op CvtScaleF32F32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32F32Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32F32Bf8Op CvtScaleF32F32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F32Bf8Op CvtScaleF32F32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32F32Bf8Op::verifyInvariantsImpl() {
  auto tblgen_srcSelIndex = getProperties().srcSelIndex; (void)tblgen_srcSelIndex;
  if (!tblgen_srcSelIndex) return emitOpError("requires attribute 'srcSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_srcSelIndex, "srcSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32F32Bf8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32F32Bf8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr srcSelIndexAttr;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(srcSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (srcSelIndexAttr) result.getOrAddProperties<CvtScaleF32F32Bf8Op::Properties>().srcSelIndex = srcSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::FloatType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32F32Bf8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("srcSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getSrcSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::FloatType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32F32Bf8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32F32Bf8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32F32Fp8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32F32Fp8OpGenericAdaptorBase::CvtScaleF32F32Fp8OpGenericAdaptorBase(CvtScaleF32F32Fp8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32F32Fp8OpGenericAdaptorBase::getSrcSelIndex() {
  auto attr = getSrcSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32F32Fp8OpAdaptor::CvtScaleF32F32Fp8OpAdaptor(CvtScaleF32F32Fp8Op op) : CvtScaleF32F32Fp8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32F32Fp8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_srcSelIndex = getProperties().srcSelIndex; (void)tblgen_srcSelIndex;
  if (!tblgen_srcSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.f32.fp8' op requires attribute 'srcSelIndex'");

  if (tblgen_srcSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_srcSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_srcSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.f32.fp8' op attribute 'srcSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32F32Fp8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.srcSelIndex;
       auto attr = dict.get("srcSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `srcSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32F32Fp8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.srcSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("srcSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32F32Fp8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.srcSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32F32Fp8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "srcSelIndex")
      return prop.srcSelIndex;
  return std::nullopt;
}

void CvtScaleF32F32Fp8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "srcSelIndex") {
       prop.srcSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.srcSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32F32Fp8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.srcSelIndex) attrs.append("srcSelIndex", prop.srcSelIndex);
}

::llvm::LogicalResult CvtScaleF32F32Fp8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getSrcSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "srcSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32F32Fp8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.srcSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32F32Fp8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.srcSelIndex);
}

uint32_t CvtScaleF32F32Fp8Op::getSrcSelIndex() {
  auto attr = getSrcSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32F32Fp8Op::setSrcSelIndex(uint32_t attrValue) {
  getProperties().srcSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32F32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = srcSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32F32Fp8Op CvtScaleF32F32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F32Fp8Op CvtScaleF32F32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  return create(builder, builder.getLoc(), res, src, scale, srcSelIndex);
}

void CvtScaleF32F32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = srcSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32F32Fp8Op CvtScaleF32F32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F32Fp8Op CvtScaleF32F32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcSelIndex);
}

void CvtScaleF32F32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), srcSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32F32Fp8Op CvtScaleF32F32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F32Fp8Op CvtScaleF32F32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  return create(builder, builder.getLoc(), res, src, scale, srcSelIndex);
}

void CvtScaleF32F32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), srcSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32F32Fp8Op CvtScaleF32F32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F32Fp8Op CvtScaleF32F32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcSelIndex);
}

void CvtScaleF32F32Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32F32Fp8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32F32Fp8Op CvtScaleF32F32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F32Fp8Op CvtScaleF32F32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32F32Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32F32Fp8Op CvtScaleF32F32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32F32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32F32Fp8Op CvtScaleF32F32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32F32Fp8Op::verifyInvariantsImpl() {
  auto tblgen_srcSelIndex = getProperties().srcSelIndex; (void)tblgen_srcSelIndex;
  if (!tblgen_srcSelIndex) return emitOpError("requires attribute 'srcSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_srcSelIndex, "srcSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32F32Fp8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32F32Fp8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr srcSelIndexAttr;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(srcSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (srcSelIndexAttr) result.getOrAddProperties<CvtScaleF32F32Fp8Op::Properties>().srcSelIndex = srcSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::FloatType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32F32Fp8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("srcSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getSrcSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::FloatType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32F32Fp8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32F32Fp8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk16Bf6Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk16Bf6Bf16OpGenericAdaptorBase::CvtScaleF32Pk16Bf6Bf16OpGenericAdaptorBase(CvtScaleF32Pk16Bf6Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk16Bf6Bf16OpAdaptor::CvtScaleF32Pk16Bf6Bf16OpAdaptor(CvtScaleF32Pk16Bf6Bf16Op op) : CvtScaleF32Pk16Bf6Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk16Bf6Bf16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk16Bf6Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk16Bf6Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk16Bf6Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk16Bf6Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk16Bf6Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk16Bf6Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk16Bf6Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk16Bf6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk16Bf6Bf16Op CvtScaleF32Pk16Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Bf6Bf16Op CvtScaleF32Pk16Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk16Bf6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Bf6Bf16Op CvtScaleF32Pk16Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Bf6Bf16Op CvtScaleF32Pk16Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk16Bf6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Bf6Bf16Op CvtScaleF32Pk16Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Bf6Bf16Op CvtScaleF32Pk16Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk16Bf6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Bf6Bf16Op CvtScaleF32Pk16Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Bf6Bf16Op CvtScaleF32Pk16Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk16Bf6Bf16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps7(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk16Bf6Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk16Bf6Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({16} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk16Bf6Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk16Bf6Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk16Bf6Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk16Bf6F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk16Bf6F16OpGenericAdaptorBase::CvtScaleF32Pk16Bf6F16OpGenericAdaptorBase(CvtScaleF32Pk16Bf6F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk16Bf6F16OpAdaptor::CvtScaleF32Pk16Bf6F16OpAdaptor(CvtScaleF32Pk16Bf6F16Op op) : CvtScaleF32Pk16Bf6F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk16Bf6F16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk16Bf6F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk16Bf6F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk16Bf6F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk16Bf6F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk16Bf6F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk16Bf6F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk16Bf6F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk16Bf6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk16Bf6F16Op CvtScaleF32Pk16Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Bf6F16Op CvtScaleF32Pk16Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk16Bf6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Bf6F16Op CvtScaleF32Pk16Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Bf6F16Op CvtScaleF32Pk16Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk16Bf6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Bf6F16Op CvtScaleF32Pk16Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Bf6F16Op CvtScaleF32Pk16Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk16Bf6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Bf6F16Op CvtScaleF32Pk16Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Bf6F16Op CvtScaleF32Pk16Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk16Bf6F16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps8(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk16Bf6F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk16Bf6F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({16} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk16Bf6F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk16Bf6F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk16Bf6F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk16Bf6F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk16Bf6F32OpGenericAdaptorBase::CvtScaleF32Pk16Bf6F32OpGenericAdaptorBase(CvtScaleF32Pk16Bf6F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk16Bf6F32OpAdaptor::CvtScaleF32Pk16Bf6F32OpAdaptor(CvtScaleF32Pk16Bf6F32Op op) : CvtScaleF32Pk16Bf6F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk16Bf6F32OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk16Bf6F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk16Bf6F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk16Bf6F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk16Bf6F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk16Bf6F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk16Bf6F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk16Bf6F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk16Bf6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk16Bf6F32Op CvtScaleF32Pk16Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Bf6F32Op CvtScaleF32Pk16Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk16Bf6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Bf6F32Op CvtScaleF32Pk16Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Bf6F32Op CvtScaleF32Pk16Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk16Bf6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Bf6F32Op CvtScaleF32Pk16Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Bf6F32Op CvtScaleF32Pk16Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk16Bf6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Bf6F32Op CvtScaleF32Pk16Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Bf6F32Op CvtScaleF32Pk16Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk16Bf6F32Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps9(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk16Bf6F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk16Bf6F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({16} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk16Bf6F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk16Bf6F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk16Bf6F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk16Fp6Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk16Fp6Bf16OpGenericAdaptorBase::CvtScaleF32Pk16Fp6Bf16OpGenericAdaptorBase(CvtScaleF32Pk16Fp6Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk16Fp6Bf16OpAdaptor::CvtScaleF32Pk16Fp6Bf16OpAdaptor(CvtScaleF32Pk16Fp6Bf16Op op) : CvtScaleF32Pk16Fp6Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk16Fp6Bf16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk16Fp6Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk16Fp6Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk16Fp6Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk16Fp6Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk16Fp6Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk16Fp6Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk16Fp6Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk16Fp6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk16Fp6Bf16Op CvtScaleF32Pk16Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Fp6Bf16Op CvtScaleF32Pk16Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk16Fp6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Fp6Bf16Op CvtScaleF32Pk16Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Fp6Bf16Op CvtScaleF32Pk16Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk16Fp6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Fp6Bf16Op CvtScaleF32Pk16Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Fp6Bf16Op CvtScaleF32Pk16Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk16Fp6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Fp6Bf16Op CvtScaleF32Pk16Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Fp6Bf16Op CvtScaleF32Pk16Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk16Fp6Bf16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps7(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk16Fp6Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk16Fp6Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({16} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk16Fp6Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk16Fp6Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk16Fp6Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk16Fp6F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk16Fp6F16OpGenericAdaptorBase::CvtScaleF32Pk16Fp6F16OpGenericAdaptorBase(CvtScaleF32Pk16Fp6F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk16Fp6F16OpAdaptor::CvtScaleF32Pk16Fp6F16OpAdaptor(CvtScaleF32Pk16Fp6F16Op op) : CvtScaleF32Pk16Fp6F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk16Fp6F16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk16Fp6F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk16Fp6F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk16Fp6F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk16Fp6F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk16Fp6F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk16Fp6F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk16Fp6F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk16Fp6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk16Fp6F16Op CvtScaleF32Pk16Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Fp6F16Op CvtScaleF32Pk16Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk16Fp6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Fp6F16Op CvtScaleF32Pk16Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Fp6F16Op CvtScaleF32Pk16Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk16Fp6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Fp6F16Op CvtScaleF32Pk16Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Fp6F16Op CvtScaleF32Pk16Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk16Fp6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Fp6F16Op CvtScaleF32Pk16Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Fp6F16Op CvtScaleF32Pk16Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk16Fp6F16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps8(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk16Fp6F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk16Fp6F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({16} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk16Fp6F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk16Fp6F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk16Fp6F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk16Fp6F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk16Fp6F32OpGenericAdaptorBase::CvtScaleF32Pk16Fp6F32OpGenericAdaptorBase(CvtScaleF32Pk16Fp6F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk16Fp6F32OpAdaptor::CvtScaleF32Pk16Fp6F32OpAdaptor(CvtScaleF32Pk16Fp6F32Op op) : CvtScaleF32Pk16Fp6F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk16Fp6F32OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk16Fp6F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk16Fp6F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk16Fp6F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk16Fp6F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk16Fp6F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk16Fp6F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk16Fp6F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk16Fp6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk16Fp6F32Op CvtScaleF32Pk16Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Fp6F32Op CvtScaleF32Pk16Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk16Fp6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Fp6F32Op CvtScaleF32Pk16Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Fp6F32Op CvtScaleF32Pk16Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk16Fp6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Fp6F32Op CvtScaleF32Pk16Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Fp6F32Op CvtScaleF32Pk16Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk16Fp6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk16Fp6F32Op CvtScaleF32Pk16Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk16Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk16Fp6F32Op CvtScaleF32Pk16Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk16Fp6F32Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps9(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk16Fp6F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk16Fp6F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({16} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk16Fp6F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk16Fp6F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk16Fp6F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk32Bf16Bf6Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk32Bf16Bf6OpGenericAdaptorBase::CvtScaleF32Pk32Bf16Bf6OpGenericAdaptorBase(CvtScaleF32Pk32Bf16Bf6Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk32Bf16Bf6OpAdaptor::CvtScaleF32Pk32Bf16Bf6OpAdaptor(CvtScaleF32Pk32Bf16Bf6Op op) : CvtScaleF32Pk32Bf16Bf6OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk32Bf16Bf6OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32Bf16Bf6Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk32Bf16Bf6Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk32Bf16Bf6Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk32Bf16Bf6Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk32Bf16Bf6Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk32Bf16Bf6Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk32Bf16Bf6Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk32Bf16Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk32Bf16Bf6Op CvtScaleF32Pk32Bf16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf16Bf6Op CvtScaleF32Pk32Bf16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk32Bf16Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Bf16Bf6Op CvtScaleF32Pk32Bf16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf16Bf6Op CvtScaleF32Pk32Bf16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk32Bf16Bf6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Bf16Bf6Op CvtScaleF32Pk32Bf16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf16Bf6Op CvtScaleF32Pk32Bf16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk32Bf16Bf6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Bf16Bf6Op CvtScaleF32Pk32Bf16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf16Bf6Op CvtScaleF32Pk32Bf16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk32Bf16Bf6Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps16(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32Bf16Bf6Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk32Bf16Bf6Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({6} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk32Bf16Bf6Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk32Bf16Bf6Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk32Bf16Bf6Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk32Bf16Fp6Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk32Bf16Fp6OpGenericAdaptorBase::CvtScaleF32Pk32Bf16Fp6OpGenericAdaptorBase(CvtScaleF32Pk32Bf16Fp6Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk32Bf16Fp6OpAdaptor::CvtScaleF32Pk32Bf16Fp6OpAdaptor(CvtScaleF32Pk32Bf16Fp6Op op) : CvtScaleF32Pk32Bf16Fp6OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk32Bf16Fp6OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32Bf16Fp6Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk32Bf16Fp6Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk32Bf16Fp6Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk32Bf16Fp6Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk32Bf16Fp6Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk32Bf16Fp6Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk32Bf16Fp6Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk32Bf16Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk32Bf16Fp6Op CvtScaleF32Pk32Bf16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf16Fp6Op CvtScaleF32Pk32Bf16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk32Bf16Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Bf16Fp6Op CvtScaleF32Pk32Bf16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf16Fp6Op CvtScaleF32Pk32Bf16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk32Bf16Fp6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Bf16Fp6Op CvtScaleF32Pk32Bf16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf16Fp6Op CvtScaleF32Pk32Bf16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk32Bf16Fp6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Bf16Fp6Op CvtScaleF32Pk32Bf16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf16Fp6Op CvtScaleF32Pk32Bf16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk32Bf16Fp6Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps16(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32Bf16Fp6Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk32Bf16Fp6Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({6} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk32Bf16Fp6Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk32Bf16Fp6Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk32Bf16Fp6Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk32Bf6Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk32Bf6Bf16OpGenericAdaptorBase::CvtScaleF32Pk32Bf6Bf16OpGenericAdaptorBase(CvtScaleF32Pk32Bf6Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk32Bf6Bf16OpAdaptor::CvtScaleF32Pk32Bf6Bf16OpAdaptor(CvtScaleF32Pk32Bf6Bf16Op op) : CvtScaleF32Pk32Bf6Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk32Bf6Bf16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32Bf6Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk32Bf6Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk32Bf6Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk32Bf6Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk32Bf6Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk32Bf6Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk32Bf6Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk32Bf6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk32Bf6Bf16Op CvtScaleF32Pk32Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf6Bf16Op CvtScaleF32Pk32Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk32Bf6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Bf6Bf16Op CvtScaleF32Pk32Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf6Bf16Op CvtScaleF32Pk32Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk32Bf6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Bf6Bf16Op CvtScaleF32Pk32Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf6Bf16Op CvtScaleF32Pk32Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk32Bf6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Bf6Bf16Op CvtScaleF32Pk32Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf6Bf16Op CvtScaleF32Pk32Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk32Bf6Bf16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps16(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32Bf6Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk32Bf6Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({32} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk32Bf6Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk32Bf6Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk32Bf6Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk32Bf6F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk32Bf6F16OpGenericAdaptorBase::CvtScaleF32Pk32Bf6F16OpGenericAdaptorBase(CvtScaleF32Pk32Bf6F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk32Bf6F16OpAdaptor::CvtScaleF32Pk32Bf6F16OpAdaptor(CvtScaleF32Pk32Bf6F16Op op) : CvtScaleF32Pk32Bf6F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk32Bf6F16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32Bf6F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk32Bf6F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk32Bf6F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk32Bf6F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk32Bf6F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk32Bf6F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk32Bf6F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk32Bf6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk32Bf6F16Op CvtScaleF32Pk32Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf6F16Op CvtScaleF32Pk32Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk32Bf6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Bf6F16Op CvtScaleF32Pk32Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf6F16Op CvtScaleF32Pk32Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk32Bf6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Bf6F16Op CvtScaleF32Pk32Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf6F16Op CvtScaleF32Pk32Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk32Bf6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Bf6F16Op CvtScaleF32Pk32Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Bf6F16Op CvtScaleF32Pk32Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk32Bf6F16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps17(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32Bf6F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk32Bf6F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({32} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk32Bf6F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk32Bf6F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk32Bf6F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk32F16Bf6Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk32F16Bf6OpGenericAdaptorBase::CvtScaleF32Pk32F16Bf6OpGenericAdaptorBase(CvtScaleF32Pk32F16Bf6Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk32F16Bf6OpAdaptor::CvtScaleF32Pk32F16Bf6OpAdaptor(CvtScaleF32Pk32F16Bf6Op op) : CvtScaleF32Pk32F16Bf6OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk32F16Bf6OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32F16Bf6Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk32F16Bf6Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk32F16Bf6Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk32F16Bf6Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk32F16Bf6Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk32F16Bf6Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk32F16Bf6Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk32F16Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk32F16Bf6Op CvtScaleF32Pk32F16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F16Bf6Op CvtScaleF32Pk32F16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk32F16Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32F16Bf6Op CvtScaleF32Pk32F16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F16Bf6Op CvtScaleF32Pk32F16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk32F16Bf6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32F16Bf6Op CvtScaleF32Pk32F16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F16Bf6Op CvtScaleF32Pk32F16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk32F16Bf6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32F16Bf6Op CvtScaleF32Pk32F16Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F16Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F16Bf6Op CvtScaleF32Pk32F16Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk32F16Bf6Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps17(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32F16Bf6Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk32F16Bf6Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({6} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk32F16Bf6Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk32F16Bf6Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk32F16Bf6Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk32F16Fp6Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk32F16Fp6OpGenericAdaptorBase::CvtScaleF32Pk32F16Fp6OpGenericAdaptorBase(CvtScaleF32Pk32F16Fp6Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk32F16Fp6OpAdaptor::CvtScaleF32Pk32F16Fp6OpAdaptor(CvtScaleF32Pk32F16Fp6Op op) : CvtScaleF32Pk32F16Fp6OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk32F16Fp6OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32F16Fp6Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk32F16Fp6Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk32F16Fp6Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk32F16Fp6Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk32F16Fp6Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk32F16Fp6Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk32F16Fp6Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk32F16Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk32F16Fp6Op CvtScaleF32Pk32F16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F16Fp6Op CvtScaleF32Pk32F16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk32F16Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32F16Fp6Op CvtScaleF32Pk32F16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F16Fp6Op CvtScaleF32Pk32F16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk32F16Fp6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32F16Fp6Op CvtScaleF32Pk32F16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F16Fp6Op CvtScaleF32Pk32F16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk32F16Fp6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32F16Fp6Op CvtScaleF32Pk32F16Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F16Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F16Fp6Op CvtScaleF32Pk32F16Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk32F16Fp6Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps17(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32F16Fp6Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk32F16Fp6Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({6} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk32F16Fp6Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk32F16Fp6Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk32F16Fp6Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk32F32Bf6Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk32F32Bf6OpGenericAdaptorBase::CvtScaleF32Pk32F32Bf6OpGenericAdaptorBase(CvtScaleF32Pk32F32Bf6Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk32F32Bf6OpAdaptor::CvtScaleF32Pk32F32Bf6OpAdaptor(CvtScaleF32Pk32F32Bf6Op op) : CvtScaleF32Pk32F32Bf6OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk32F32Bf6OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32F32Bf6Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk32F32Bf6Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk32F32Bf6Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk32F32Bf6Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk32F32Bf6Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk32F32Bf6Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk32F32Bf6Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk32F32Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk32F32Bf6Op CvtScaleF32Pk32F32Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F32Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F32Bf6Op CvtScaleF32Pk32F32Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk32F32Bf6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32F32Bf6Op CvtScaleF32Pk32F32Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F32Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F32Bf6Op CvtScaleF32Pk32F32Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk32F32Bf6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32F32Bf6Op CvtScaleF32Pk32F32Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F32Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F32Bf6Op CvtScaleF32Pk32F32Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk32F32Bf6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32F32Bf6Op CvtScaleF32Pk32F32Bf6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F32Bf6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F32Bf6Op CvtScaleF32Pk32F32Bf6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk32F32Bf6Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps18(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32F32Bf6Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk32F32Bf6Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({6} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk32F32Bf6Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk32F32Bf6Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk32F32Bf6Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk32F32Fp6Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk32F32Fp6OpGenericAdaptorBase::CvtScaleF32Pk32F32Fp6OpGenericAdaptorBase(CvtScaleF32Pk32F32Fp6Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk32F32Fp6OpAdaptor::CvtScaleF32Pk32F32Fp6OpAdaptor(CvtScaleF32Pk32F32Fp6Op op) : CvtScaleF32Pk32F32Fp6OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk32F32Fp6OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32F32Fp6Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk32F32Fp6Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk32F32Fp6Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk32F32Fp6Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk32F32Fp6Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk32F32Fp6Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk32F32Fp6Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk32F32Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk32F32Fp6Op CvtScaleF32Pk32F32Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F32Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F32Fp6Op CvtScaleF32Pk32F32Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk32F32Fp6Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32F32Fp6Op CvtScaleF32Pk32F32Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F32Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F32Fp6Op CvtScaleF32Pk32F32Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk32F32Fp6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32F32Fp6Op CvtScaleF32Pk32F32Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F32Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F32Fp6Op CvtScaleF32Pk32F32Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk32F32Fp6Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32F32Fp6Op CvtScaleF32Pk32F32Fp6Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32F32Fp6Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32F32Fp6Op CvtScaleF32Pk32F32Fp6Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk32F32Fp6Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps18(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32F32Fp6Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk32F32Fp6Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({6} ,parser.getBuilder().getIntegerType(32));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk32F32Fp6Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk32F32Fp6Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk32F32Fp6Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk32Fp6Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk32Fp6Bf16OpGenericAdaptorBase::CvtScaleF32Pk32Fp6Bf16OpGenericAdaptorBase(CvtScaleF32Pk32Fp6Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk32Fp6Bf16OpAdaptor::CvtScaleF32Pk32Fp6Bf16OpAdaptor(CvtScaleF32Pk32Fp6Bf16Op op) : CvtScaleF32Pk32Fp6Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk32Fp6Bf16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32Fp6Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk32Fp6Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk32Fp6Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk32Fp6Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk32Fp6Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk32Fp6Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk32Fp6Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk32Fp6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk32Fp6Bf16Op CvtScaleF32Pk32Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Fp6Bf16Op CvtScaleF32Pk32Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk32Fp6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Fp6Bf16Op CvtScaleF32Pk32Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Fp6Bf16Op CvtScaleF32Pk32Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk32Fp6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Fp6Bf16Op CvtScaleF32Pk32Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Fp6Bf16Op CvtScaleF32Pk32Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk32Fp6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Fp6Bf16Op CvtScaleF32Pk32Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Fp6Bf16Op CvtScaleF32Pk32Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk32Fp6Bf16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps16(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32Fp6Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk32Fp6Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({32} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk32Fp6Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk32Fp6Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk32Fp6Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk32Fp6F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk32Fp6F16OpGenericAdaptorBase::CvtScaleF32Pk32Fp6F16OpGenericAdaptorBase(CvtScaleF32Pk32Fp6F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk32Fp6F16OpAdaptor::CvtScaleF32Pk32Fp6F16OpAdaptor(CvtScaleF32Pk32Fp6F16Op op) : CvtScaleF32Pk32Fp6F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk32Fp6F16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32Fp6F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk32Fp6F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk32Fp6F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk32Fp6F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk32Fp6F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk32Fp6F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk32Fp6F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk32Fp6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk32Fp6F16Op CvtScaleF32Pk32Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Fp6F16Op CvtScaleF32Pk32Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk32Fp6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Fp6F16Op CvtScaleF32Pk32Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Fp6F16Op CvtScaleF32Pk32Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk32Fp6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Fp6F16Op CvtScaleF32Pk32Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Fp6F16Op CvtScaleF32Pk32Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk32Fp6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk32Fp6F16Op CvtScaleF32Pk32Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk32Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk32Fp6F16Op CvtScaleF32Pk32Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk32Fp6F16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps17(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk32Fp6F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk32Fp6F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({32} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk32Fp6F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk32Fp6F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk32Fp6F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk8Bf8Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk8Bf8Bf16OpGenericAdaptorBase::CvtScaleF32Pk8Bf8Bf16OpGenericAdaptorBase(CvtScaleF32Pk8Bf8Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk8Bf8Bf16OpAdaptor::CvtScaleF32Pk8Bf8Bf16OpAdaptor(CvtScaleF32Pk8Bf8Bf16Op op) : CvtScaleF32Pk8Bf8Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk8Bf8Bf16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Bf8Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk8Bf8Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk8Bf8Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk8Bf8Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk8Bf8Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk8Bf8Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk8Bf8Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk8Bf8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk8Bf8Bf16Op CvtScaleF32Pk8Bf8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Bf8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Bf8Bf16Op CvtScaleF32Pk8Bf8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk8Bf8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Bf8Bf16Op CvtScaleF32Pk8Bf8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Bf8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Bf8Bf16Op CvtScaleF32Pk8Bf8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk8Bf8Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Bf8Bf16Op CvtScaleF32Pk8Bf8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Bf8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Bf8Bf16Op CvtScaleF32Pk8Bf8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk8Bf8Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Bf8Bf16Op CvtScaleF32Pk8Bf8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Bf8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Bf8Bf16Op CvtScaleF32Pk8Bf8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk8Bf8Bf16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps11(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Bf8Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk8Bf8Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk8Bf8Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk8Bf8Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk8Bf8Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk8Bf8F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk8Bf8F16OpGenericAdaptorBase::CvtScaleF32Pk8Bf8F16OpGenericAdaptorBase(CvtScaleF32Pk8Bf8F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk8Bf8F16OpAdaptor::CvtScaleF32Pk8Bf8F16OpAdaptor(CvtScaleF32Pk8Bf8F16Op op) : CvtScaleF32Pk8Bf8F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk8Bf8F16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Bf8F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk8Bf8F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk8Bf8F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk8Bf8F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk8Bf8F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk8Bf8F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk8Bf8F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk8Bf8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk8Bf8F16Op CvtScaleF32Pk8Bf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Bf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Bf8F16Op CvtScaleF32Pk8Bf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk8Bf8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Bf8F16Op CvtScaleF32Pk8Bf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Bf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Bf8F16Op CvtScaleF32Pk8Bf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk8Bf8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Bf8F16Op CvtScaleF32Pk8Bf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Bf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Bf8F16Op CvtScaleF32Pk8Bf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk8Bf8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Bf8F16Op CvtScaleF32Pk8Bf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Bf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Bf8F16Op CvtScaleF32Pk8Bf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk8Bf8F16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps12(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Bf8F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk8Bf8F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk8Bf8F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk8Bf8F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk8Bf8F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk8Bf8F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk8Bf8F32OpGenericAdaptorBase::CvtScaleF32Pk8Bf8F32OpGenericAdaptorBase(CvtScaleF32Pk8Bf8F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk8Bf8F32OpAdaptor::CvtScaleF32Pk8Bf8F32OpAdaptor(CvtScaleF32Pk8Bf8F32Op op) : CvtScaleF32Pk8Bf8F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk8Bf8F32OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Bf8F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk8Bf8F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk8Bf8F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk8Bf8F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk8Bf8F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk8Bf8F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk8Bf8F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk8Bf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk8Bf8F32Op CvtScaleF32Pk8Bf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Bf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Bf8F32Op CvtScaleF32Pk8Bf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk8Bf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Bf8F32Op CvtScaleF32Pk8Bf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Bf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Bf8F32Op CvtScaleF32Pk8Bf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk8Bf8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Bf8F32Op CvtScaleF32Pk8Bf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Bf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Bf8F32Op CvtScaleF32Pk8Bf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk8Bf8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Bf8F32Op CvtScaleF32Pk8Bf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Bf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Bf8F32Op CvtScaleF32Pk8Bf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk8Bf8F32Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps13(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Bf8F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk8Bf8F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk8Bf8F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk8Bf8F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk8Bf8F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk8Fp4Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk8Fp4Bf16OpGenericAdaptorBase::CvtScaleF32Pk8Fp4Bf16OpGenericAdaptorBase(CvtScaleF32Pk8Fp4Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk8Fp4Bf16OpAdaptor::CvtScaleF32Pk8Fp4Bf16OpAdaptor(CvtScaleF32Pk8Fp4Bf16Op op) : CvtScaleF32Pk8Fp4Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk8Fp4Bf16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Fp4Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk8Fp4Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk8Fp4Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk8Fp4Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk8Fp4Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk8Fp4Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk8Fp4Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk8Fp4Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk8Fp4Bf16Op CvtScaleF32Pk8Fp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp4Bf16Op CvtScaleF32Pk8Fp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk8Fp4Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp4Bf16Op CvtScaleF32Pk8Fp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp4Bf16Op CvtScaleF32Pk8Fp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk8Fp4Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp4Bf16Op CvtScaleF32Pk8Fp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp4Bf16Op CvtScaleF32Pk8Fp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk8Fp4Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp4Bf16Op CvtScaleF32Pk8Fp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp4Bf16Op CvtScaleF32Pk8Fp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk8Fp4Bf16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps11(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Fp4Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk8Fp4Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk8Fp4Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk8Fp4Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk8Fp4Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk8Fp4F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk8Fp4F16OpGenericAdaptorBase::CvtScaleF32Pk8Fp4F16OpGenericAdaptorBase(CvtScaleF32Pk8Fp4F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk8Fp4F16OpAdaptor::CvtScaleF32Pk8Fp4F16OpAdaptor(CvtScaleF32Pk8Fp4F16Op op) : CvtScaleF32Pk8Fp4F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk8Fp4F16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Fp4F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk8Fp4F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk8Fp4F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk8Fp4F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk8Fp4F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk8Fp4F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk8Fp4F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk8Fp4F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk8Fp4F16Op CvtScaleF32Pk8Fp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp4F16Op CvtScaleF32Pk8Fp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk8Fp4F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp4F16Op CvtScaleF32Pk8Fp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp4F16Op CvtScaleF32Pk8Fp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk8Fp4F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp4F16Op CvtScaleF32Pk8Fp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp4F16Op CvtScaleF32Pk8Fp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk8Fp4F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp4F16Op CvtScaleF32Pk8Fp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp4F16Op CvtScaleF32Pk8Fp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk8Fp4F16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps12(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Fp4F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk8Fp4F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk8Fp4F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk8Fp4F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk8Fp4F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk8Fp4F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk8Fp4F32OpGenericAdaptorBase::CvtScaleF32Pk8Fp4F32OpGenericAdaptorBase(CvtScaleF32Pk8Fp4F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk8Fp4F32OpAdaptor::CvtScaleF32Pk8Fp4F32OpAdaptor(CvtScaleF32Pk8Fp4F32Op op) : CvtScaleF32Pk8Fp4F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk8Fp4F32OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Fp4F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk8Fp4F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk8Fp4F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk8Fp4F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk8Fp4F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk8Fp4F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk8Fp4F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk8Fp4F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk8Fp4F32Op CvtScaleF32Pk8Fp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp4F32Op CvtScaleF32Pk8Fp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk8Fp4F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp4F32Op CvtScaleF32Pk8Fp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp4F32Op CvtScaleF32Pk8Fp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk8Fp4F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp4F32Op CvtScaleF32Pk8Fp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp4F32Op CvtScaleF32Pk8Fp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk8Fp4F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp4F32Op CvtScaleF32Pk8Fp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp4F32Op CvtScaleF32Pk8Fp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk8Fp4F32Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps13(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Fp4F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk8Fp4F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk8Fp4F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk8Fp4F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk8Fp4F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk8Fp8Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk8Fp8Bf16OpGenericAdaptorBase::CvtScaleF32Pk8Fp8Bf16OpGenericAdaptorBase(CvtScaleF32Pk8Fp8Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk8Fp8Bf16OpAdaptor::CvtScaleF32Pk8Fp8Bf16OpAdaptor(CvtScaleF32Pk8Fp8Bf16Op op) : CvtScaleF32Pk8Fp8Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk8Fp8Bf16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Fp8Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk8Fp8Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk8Fp8Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk8Fp8Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk8Fp8Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk8Fp8Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk8Fp8Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk8Fp8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk8Fp8Bf16Op CvtScaleF32Pk8Fp8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp8Bf16Op CvtScaleF32Pk8Fp8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk8Fp8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp8Bf16Op CvtScaleF32Pk8Fp8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp8Bf16Op CvtScaleF32Pk8Fp8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk8Fp8Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp8Bf16Op CvtScaleF32Pk8Fp8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp8Bf16Op CvtScaleF32Pk8Fp8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk8Fp8Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp8Bf16Op CvtScaleF32Pk8Fp8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp8Bf16Op CvtScaleF32Pk8Fp8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk8Fp8Bf16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps11(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Fp8Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk8Fp8Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk8Fp8Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk8Fp8Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk8Fp8Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk8Fp8F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk8Fp8F16OpGenericAdaptorBase::CvtScaleF32Pk8Fp8F16OpGenericAdaptorBase(CvtScaleF32Pk8Fp8F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk8Fp8F16OpAdaptor::CvtScaleF32Pk8Fp8F16OpAdaptor(CvtScaleF32Pk8Fp8F16Op op) : CvtScaleF32Pk8Fp8F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk8Fp8F16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Fp8F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk8Fp8F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk8Fp8F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk8Fp8F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk8Fp8F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk8Fp8F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk8Fp8F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk8Fp8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk8Fp8F16Op CvtScaleF32Pk8Fp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp8F16Op CvtScaleF32Pk8Fp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk8Fp8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp8F16Op CvtScaleF32Pk8Fp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp8F16Op CvtScaleF32Pk8Fp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk8Fp8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp8F16Op CvtScaleF32Pk8Fp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp8F16Op CvtScaleF32Pk8Fp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk8Fp8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp8F16Op CvtScaleF32Pk8Fp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp8F16Op CvtScaleF32Pk8Fp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk8Fp8F16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps12(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Fp8F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk8Fp8F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk8Fp8F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk8Fp8F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk8Fp8F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32Pk8Fp8F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32Pk8Fp8F32OpGenericAdaptorBase::CvtScaleF32Pk8Fp8F32OpGenericAdaptorBase(CvtScaleF32Pk8Fp8F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32Pk8Fp8F32OpAdaptor::CvtScaleF32Pk8Fp8F32OpAdaptor(CvtScaleF32Pk8Fp8F32Op op) : CvtScaleF32Pk8Fp8F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32Pk8Fp8F32OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Fp8F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32Pk8Fp8F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32Pk8Fp8F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32Pk8Fp8F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32Pk8Fp8F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32Pk8Fp8F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32Pk8Fp8F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32Pk8Fp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32Pk8Fp8F32Op CvtScaleF32Pk8Fp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp8F32Op CvtScaleF32Pk8Fp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, scale);
}

void CvtScaleF32Pk8Fp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp8F32Op CvtScaleF32Pk8Fp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp8F32Op CvtScaleF32Pk8Fp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, scale);
}

void CvtScaleF32Pk8Fp8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp8F32Op CvtScaleF32Pk8Fp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp8F32Op CvtScaleF32Pk8Fp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32Pk8Fp8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32Pk8Fp8F32Op CvtScaleF32Pk8Fp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32Pk8Fp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32Pk8Fp8F32Op CvtScaleF32Pk8Fp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32Pk8Fp8F32Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps13(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32Pk8Fp8F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32Pk8Fp8F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32Pk8Fp8F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32Pk8Fp8F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32Pk8Fp8F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkBf16Bf8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkBf16Bf8OpGenericAdaptorBase::CvtScaleF32PkBf16Bf8OpGenericAdaptorBase(CvtScaleF32PkBf16Bf8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtScaleF32PkBf16Bf8OpGenericAdaptorBase::getSrcLoHiSel() {
  auto attr = getSrcLoHiSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkBf16Bf8OpAdaptor::CvtScaleF32PkBf16Bf8OpAdaptor(CvtScaleF32PkBf16Bf8Op op) : CvtScaleF32PkBf16Bf8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkBf16Bf8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_srcLoHiSel = getProperties().srcLoHiSel; (void)tblgen_srcLoHiSel;
  if (!tblgen_srcLoHiSel) return emitError(loc, "'rocdl.cvt.scalef32.pk.bf16.bf8' op requires attribute 'srcLoHiSel'");

  if (tblgen_srcLoHiSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_srcLoHiSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_srcLoHiSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.bf16.bf8' op attribute 'srcLoHiSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf16Bf8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.srcLoHiSel;
       auto attr = dict.get("srcLoHiSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `srcLoHiSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkBf16Bf8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.srcLoHiSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("srcLoHiSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkBf16Bf8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.srcLoHiSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkBf16Bf8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "srcLoHiSel")
      return prop.srcLoHiSel;
  return std::nullopt;
}

void CvtScaleF32PkBf16Bf8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "srcLoHiSel") {
       prop.srcLoHiSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.srcLoHiSel)>>(value);
       return;
    }
}

void CvtScaleF32PkBf16Bf8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.srcLoHiSel) attrs.append("srcLoHiSel", prop.srcLoHiSel);
}

::llvm::LogicalResult CvtScaleF32PkBf16Bf8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getSrcLoHiSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "srcLoHiSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf16Bf8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.srcLoHiSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkBf16Bf8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.srcLoHiSel);
}

bool CvtScaleF32PkBf16Bf8Op::getSrcLoHiSel() {
  auto attr = getSrcLoHiSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkBf16Bf8Op::setSrcLoHiSel(bool attrValue) {
  getProperties().srcLoHiSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtScaleF32PkBf16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = srcLoHiSel;
  odsState.addTypes(res);
}

CvtScaleF32PkBf16Bf8Op CvtScaleF32PkBf16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Bf8Op CvtScaleF32PkBf16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  return create(builder, builder.getLoc(), res, src, scale, srcLoHiSel);
}

void CvtScaleF32PkBf16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = srcLoHiSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf16Bf8Op CvtScaleF32PkBf16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Bf8Op CvtScaleF32PkBf16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcLoHiSel);
}

void CvtScaleF32PkBf16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), srcLoHiSel);
  odsState.addTypes(res);
}

CvtScaleF32PkBf16Bf8Op CvtScaleF32PkBf16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Bf8Op CvtScaleF32PkBf16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  return create(builder, builder.getLoc(), res, src, scale, srcLoHiSel);
}

void CvtScaleF32PkBf16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), srcLoHiSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf16Bf8Op CvtScaleF32PkBf16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Bf8Op CvtScaleF32PkBf16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcLoHiSel);
}

void CvtScaleF32PkBf16Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkBf16Bf8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkBf16Bf8Op CvtScaleF32PkBf16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Bf8Op CvtScaleF32PkBf16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkBf16Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf16Bf8Op CvtScaleF32PkBf16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Bf8Op CvtScaleF32PkBf16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkBf16Bf8Op::verifyInvariantsImpl() {
  auto tblgen_srcLoHiSel = getProperties().srcLoHiSel; (void)tblgen_srcLoHiSel;
  if (!tblgen_srcLoHiSel) return emitOpError("requires attribute 'srcLoHiSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_srcLoHiSel, "srcLoHiSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps19(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf16Bf8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkBf16Bf8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr srcLoHiSelAttr;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(srcLoHiSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (srcLoHiSelAttr) result.getOrAddProperties<CvtScaleF32PkBf16Bf8Op::Properties>().srcLoHiSel = srcLoHiSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkBf16Bf8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("srcLoHiSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getSrcLoHiSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkBf16Bf8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkBf16Bf8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkBf16Fp4Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkBf16Fp4OpGenericAdaptorBase::CvtScaleF32PkBf16Fp4OpGenericAdaptorBase(CvtScaleF32PkBf16Fp4Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32PkBf16Fp4OpGenericAdaptorBase::getSrcSelIndex() {
  auto attr = getSrcSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkBf16Fp4OpAdaptor::CvtScaleF32PkBf16Fp4OpAdaptor(CvtScaleF32PkBf16Fp4Op op) : CvtScaleF32PkBf16Fp4OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkBf16Fp4OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_srcSelIndex = getProperties().srcSelIndex; (void)tblgen_srcSelIndex;
  if (!tblgen_srcSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.pk.bf16.fp4' op requires attribute 'srcSelIndex'");

  if (tblgen_srcSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_srcSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_srcSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.bf16.fp4' op attribute 'srcSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf16Fp4Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.srcSelIndex;
       auto attr = dict.get("srcSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `srcSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkBf16Fp4Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.srcSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("srcSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkBf16Fp4Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.srcSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkBf16Fp4Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "srcSelIndex")
      return prop.srcSelIndex;
  return std::nullopt;
}

void CvtScaleF32PkBf16Fp4Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "srcSelIndex") {
       prop.srcSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.srcSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32PkBf16Fp4Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.srcSelIndex) attrs.append("srcSelIndex", prop.srcSelIndex);
}

::llvm::LogicalResult CvtScaleF32PkBf16Fp4Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getSrcSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "srcSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf16Fp4Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.srcSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkBf16Fp4Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.srcSelIndex);
}

uint32_t CvtScaleF32PkBf16Fp4Op::getSrcSelIndex() {
  auto attr = getSrcSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkBf16Fp4Op::setSrcSelIndex(uint32_t attrValue) {
  getProperties().srcSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32PkBf16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = srcSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32PkBf16Fp4Op CvtScaleF32PkBf16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Fp4Op CvtScaleF32PkBf16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  return create(builder, builder.getLoc(), res, src, scale, srcSelIndex);
}

void CvtScaleF32PkBf16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = srcSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf16Fp4Op CvtScaleF32PkBf16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Fp4Op CvtScaleF32PkBf16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcSelIndex);
}

void CvtScaleF32PkBf16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), srcSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32PkBf16Fp4Op CvtScaleF32PkBf16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Fp4Op CvtScaleF32PkBf16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  return create(builder, builder.getLoc(), res, src, scale, srcSelIndex);
}

void CvtScaleF32PkBf16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), srcSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf16Fp4Op CvtScaleF32PkBf16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Fp4Op CvtScaleF32PkBf16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcSelIndex);
}

void CvtScaleF32PkBf16Fp4Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkBf16Fp4Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkBf16Fp4Op CvtScaleF32PkBf16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Fp4Op CvtScaleF32PkBf16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkBf16Fp4Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf16Fp4Op CvtScaleF32PkBf16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Fp4Op CvtScaleF32PkBf16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkBf16Fp4Op::verifyInvariantsImpl() {
  auto tblgen_srcSelIndex = getProperties().srcSelIndex; (void)tblgen_srcSelIndex;
  if (!tblgen_srcSelIndex) return emitOpError("requires attribute 'srcSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_srcSelIndex, "srcSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps19(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf16Fp4Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkBf16Fp4Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr srcSelIndexAttr;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(srcSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (srcSelIndexAttr) result.getOrAddProperties<CvtScaleF32PkBf16Fp4Op::Properties>().srcSelIndex = srcSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkBf16Fp4Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("srcSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getSrcSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkBf16Fp4Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkBf16Fp4Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkBf16Fp8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkBf16Fp8OpGenericAdaptorBase::CvtScaleF32PkBf16Fp8OpGenericAdaptorBase(CvtScaleF32PkBf16Fp8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtScaleF32PkBf16Fp8OpGenericAdaptorBase::getSrcLoHiSel() {
  auto attr = getSrcLoHiSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkBf16Fp8OpAdaptor::CvtScaleF32PkBf16Fp8OpAdaptor(CvtScaleF32PkBf16Fp8Op op) : CvtScaleF32PkBf16Fp8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkBf16Fp8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_srcLoHiSel = getProperties().srcLoHiSel; (void)tblgen_srcLoHiSel;
  if (!tblgen_srcLoHiSel) return emitError(loc, "'rocdl.cvt.scalef32.pk.bf16.fp8' op requires attribute 'srcLoHiSel'");

  if (tblgen_srcLoHiSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_srcLoHiSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_srcLoHiSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.bf16.fp8' op attribute 'srcLoHiSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf16Fp8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.srcLoHiSel;
       auto attr = dict.get("srcLoHiSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `srcLoHiSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkBf16Fp8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.srcLoHiSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("srcLoHiSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkBf16Fp8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.srcLoHiSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkBf16Fp8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "srcLoHiSel")
      return prop.srcLoHiSel;
  return std::nullopt;
}

void CvtScaleF32PkBf16Fp8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "srcLoHiSel") {
       prop.srcLoHiSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.srcLoHiSel)>>(value);
       return;
    }
}

void CvtScaleF32PkBf16Fp8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.srcLoHiSel) attrs.append("srcLoHiSel", prop.srcLoHiSel);
}

::llvm::LogicalResult CvtScaleF32PkBf16Fp8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getSrcLoHiSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "srcLoHiSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf16Fp8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.srcLoHiSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkBf16Fp8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.srcLoHiSel);
}

bool CvtScaleF32PkBf16Fp8Op::getSrcLoHiSel() {
  auto attr = getSrcLoHiSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkBf16Fp8Op::setSrcLoHiSel(bool attrValue) {
  getProperties().srcLoHiSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtScaleF32PkBf16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = srcLoHiSel;
  odsState.addTypes(res);
}

CvtScaleF32PkBf16Fp8Op CvtScaleF32PkBf16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Fp8Op CvtScaleF32PkBf16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  return create(builder, builder.getLoc(), res, src, scale, srcLoHiSel);
}

void CvtScaleF32PkBf16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = srcLoHiSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf16Fp8Op CvtScaleF32PkBf16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Fp8Op CvtScaleF32PkBf16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcLoHiSel);
}

void CvtScaleF32PkBf16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), srcLoHiSel);
  odsState.addTypes(res);
}

CvtScaleF32PkBf16Fp8Op CvtScaleF32PkBf16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Fp8Op CvtScaleF32PkBf16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  return create(builder, builder.getLoc(), res, src, scale, srcLoHiSel);
}

void CvtScaleF32PkBf16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), srcLoHiSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf16Fp8Op CvtScaleF32PkBf16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Fp8Op CvtScaleF32PkBf16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcLoHiSel);
}

void CvtScaleF32PkBf16Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkBf16Fp8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkBf16Fp8Op CvtScaleF32PkBf16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Fp8Op CvtScaleF32PkBf16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkBf16Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf16Fp8Op CvtScaleF32PkBf16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf16Fp8Op CvtScaleF32PkBf16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkBf16Fp8Op::verifyInvariantsImpl() {
  auto tblgen_srcLoHiSel = getProperties().srcLoHiSel; (void)tblgen_srcLoHiSel;
  if (!tblgen_srcLoHiSel) return emitOpError("requires attribute 'srcLoHiSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_srcLoHiSel, "srcLoHiSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps19(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf16Fp8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkBf16Fp8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr srcLoHiSelAttr;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(srcLoHiSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (srcLoHiSelAttr) result.getOrAddProperties<CvtScaleF32PkBf16Fp8Op::Properties>().srcLoHiSel = srcLoHiSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkBf16Fp8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("srcLoHiSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getSrcLoHiSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkBf16Fp8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkBf16Fp8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkBf8Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkBf8Bf16OpGenericAdaptorBase::CvtScaleF32PkBf8Bf16OpGenericAdaptorBase(CvtScaleF32PkBf8Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtScaleF32PkBf8Bf16OpGenericAdaptorBase::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkBf8Bf16OpAdaptor::CvtScaleF32PkBf8Bf16OpAdaptor(CvtScaleF32PkBf8Bf16Op op) : CvtScaleF32PkBf8Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkBf8Bf16OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitError(loc, "'rocdl.cvt.scalef32.pk.bf8.bf16' op requires attribute 'dstLoHiSel'");

  if (tblgen_dstLoHiSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstLoHiSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstLoHiSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.bf8.bf16' op attribute 'dstLoHiSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf8Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstLoHiSel;
       auto attr = dict.get("dstLoHiSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstLoHiSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkBf8Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstLoHiSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstLoHiSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkBf8Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstLoHiSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkBf8Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstLoHiSel")
      return prop.dstLoHiSel;
  return std::nullopt;
}

void CvtScaleF32PkBf8Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstLoHiSel") {
       prop.dstLoHiSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstLoHiSel)>>(value);
       return;
    }
}

void CvtScaleF32PkBf8Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstLoHiSel) attrs.append("dstLoHiSel", prop.dstLoHiSel);
}

::llvm::LogicalResult CvtScaleF32PkBf8Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstLoHiSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "dstLoHiSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf8Bf16Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstLoHiSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkBf8Bf16Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstLoHiSel);
}

bool CvtScaleF32PkBf8Bf16Op::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkBf8Bf16Op::setDstLoHiSel(bool attrValue) {
  getProperties().dstLoHiSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtScaleF32PkBf8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  odsState.addTypes(res);
}

CvtScaleF32PkBf8Bf16Op CvtScaleF32PkBf8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8Bf16Op CvtScaleF32PkBf8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkBf8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf8Bf16Op CvtScaleF32PkBf8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8Bf16Op CvtScaleF32PkBf8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkBf8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  odsState.addTypes(res);
}

CvtScaleF32PkBf8Bf16Op CvtScaleF32PkBf8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8Bf16Op CvtScaleF32PkBf8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkBf8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf8Bf16Op CvtScaleF32PkBf8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8Bf16Op CvtScaleF32PkBf8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkBf8Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkBf8Bf16Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkBf8Bf16Op CvtScaleF32PkBf8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8Bf16Op CvtScaleF32PkBf8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkBf8Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf8Bf16Op CvtScaleF32PkBf8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8Bf16Op CvtScaleF32PkBf8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkBf8Bf16Op::verifyInvariantsImpl() {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitOpError("requires attribute 'dstLoHiSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_dstLoHiSel, "dstLoHiSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps20(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps19(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps20(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf8Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkBf8Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstLoHiSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstLoHiSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (dstLoHiSelAttr) result.getOrAddProperties<CvtScaleF32PkBf8Bf16Op::Properties>().dstLoHiSel = dstLoHiSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({2} ,parser.getBuilder().getIntegerType(16));
  ::mlir::Type odsBuildableType1 = ::mlir::VectorType::get({2} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src0Operands, odsBuildableType1, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkBf8Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstLoHiSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstLoHiSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkBf8Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkBf8Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkBf8F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkBf8F16OpGenericAdaptorBase::CvtScaleF32PkBf8F16OpGenericAdaptorBase(CvtScaleF32PkBf8F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtScaleF32PkBf8F16OpGenericAdaptorBase::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkBf8F16OpAdaptor::CvtScaleF32PkBf8F16OpAdaptor(CvtScaleF32PkBf8F16Op op) : CvtScaleF32PkBf8F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkBf8F16OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitError(loc, "'rocdl.cvt.scalef32.pk.bf8.f16' op requires attribute 'dstLoHiSel'");

  if (tblgen_dstLoHiSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstLoHiSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstLoHiSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.bf8.f16' op attribute 'dstLoHiSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf8F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstLoHiSel;
       auto attr = dict.get("dstLoHiSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstLoHiSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkBf8F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstLoHiSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstLoHiSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkBf8F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstLoHiSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkBf8F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstLoHiSel")
      return prop.dstLoHiSel;
  return std::nullopt;
}

void CvtScaleF32PkBf8F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstLoHiSel") {
       prop.dstLoHiSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstLoHiSel)>>(value);
       return;
    }
}

void CvtScaleF32PkBf8F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstLoHiSel) attrs.append("dstLoHiSel", prop.dstLoHiSel);
}

::llvm::LogicalResult CvtScaleF32PkBf8F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstLoHiSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "dstLoHiSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf8F16Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstLoHiSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkBf8F16Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstLoHiSel);
}

bool CvtScaleF32PkBf8F16Op::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkBf8F16Op::setDstLoHiSel(bool attrValue) {
  getProperties().dstLoHiSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtScaleF32PkBf8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  odsState.addTypes(res);
}

CvtScaleF32PkBf8F16Op CvtScaleF32PkBf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8F16Op CvtScaleF32PkBf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkBf8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf8F16Op CvtScaleF32PkBf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8F16Op CvtScaleF32PkBf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkBf8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  odsState.addTypes(res);
}

CvtScaleF32PkBf8F16Op CvtScaleF32PkBf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8F16Op CvtScaleF32PkBf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkBf8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf8F16Op CvtScaleF32PkBf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8F16Op CvtScaleF32PkBf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkBf8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkBf8F16Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkBf8F16Op CvtScaleF32PkBf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8F16Op CvtScaleF32PkBf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkBf8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf8F16Op CvtScaleF32PkBf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8F16Op CvtScaleF32PkBf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkBf8F16Op::verifyInvariantsImpl() {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitOpError("requires attribute 'dstLoHiSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_dstLoHiSel, "dstLoHiSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps20(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps15(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps20(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf8F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkBf8F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstLoHiSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstLoHiSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (dstLoHiSelAttr) result.getOrAddProperties<CvtScaleF32PkBf8F16Op::Properties>().dstLoHiSel = dstLoHiSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({2} ,parser.getBuilder().getIntegerType(16));
  ::mlir::Type odsBuildableType1 = ::mlir::VectorType::get({2} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src0Operands, odsBuildableType1, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkBf8F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstLoHiSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstLoHiSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkBf8F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkBf8F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkBf8F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkBf8F32OpGenericAdaptorBase::CvtScaleF32PkBf8F32OpGenericAdaptorBase(CvtScaleF32PkBf8F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtScaleF32PkBf8F32OpGenericAdaptorBase::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkBf8F32OpAdaptor::CvtScaleF32PkBf8F32OpAdaptor(CvtScaleF32PkBf8F32Op op) : CvtScaleF32PkBf8F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkBf8F32OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitError(loc, "'rocdl.cvt.scalef32.pk.bf8.f32' op requires attribute 'dstLoHiSel'");

  if (tblgen_dstLoHiSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstLoHiSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstLoHiSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.bf8.f32' op attribute 'dstLoHiSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf8F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstLoHiSel;
       auto attr = dict.get("dstLoHiSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstLoHiSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkBf8F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstLoHiSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstLoHiSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkBf8F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstLoHiSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkBf8F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstLoHiSel")
      return prop.dstLoHiSel;
  return std::nullopt;
}

void CvtScaleF32PkBf8F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstLoHiSel") {
       prop.dstLoHiSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstLoHiSel)>>(value);
       return;
    }
}

void CvtScaleF32PkBf8F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstLoHiSel) attrs.append("dstLoHiSel", prop.dstLoHiSel);
}

::llvm::LogicalResult CvtScaleF32PkBf8F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstLoHiSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "dstLoHiSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf8F32Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstLoHiSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkBf8F32Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstLoHiSel);
}

bool CvtScaleF32PkBf8F32Op::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkBf8F32Op::setDstLoHiSel(bool attrValue) {
  getProperties().dstLoHiSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtScaleF32PkBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  odsState.addTypes(res);
}

CvtScaleF32PkBf8F32Op CvtScaleF32PkBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, src1, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8F32Op CvtScaleF32PkBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, src1, scale, dstLoHiSel);
}

void CvtScaleF32PkBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf8F32Op CvtScaleF32PkBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, src1, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8F32Op CvtScaleF32PkBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, src1, scale, dstLoHiSel);
}

void CvtScaleF32PkBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  odsState.addTypes(res);
}

CvtScaleF32PkBf8F32Op CvtScaleF32PkBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, src1, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8F32Op CvtScaleF32PkBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, src1, scale, dstLoHiSel);
}

void CvtScaleF32PkBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf8F32Op CvtScaleF32PkBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, src1, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8F32Op CvtScaleF32PkBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, src1, scale, dstLoHiSel);
}

void CvtScaleF32PkBf8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkBf8F32Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkBf8F32Op CvtScaleF32PkBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8F32Op CvtScaleF32PkBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkBf8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkBf8F32Op CvtScaleF32PkBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkBf8F32Op CvtScaleF32PkBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkBf8F32Op::verifyInvariantsImpl() {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitOpError("requires attribute 'dstLoHiSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_dstLoHiSel, "dstLoHiSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps20(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps20(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkBf8F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkBf8F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand src1RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src1Operands(&src1RawOperand, 1);  ::llvm::SMLoc src1OperandsLoc;
  (void)src1OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstLoHiSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  src1OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src1RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstLoHiSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (dstLoHiSelAttr) result.getOrAddProperties<CvtScaleF32PkBf8F32Op::Properties>().dstLoHiSel = dstLoHiSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({2} ,parser.getBuilder().getIntegerType(16));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src0Operands, odsBuildableType1, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src1Operands, odsBuildableType1, src1OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkBf8F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstLoHiSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc1();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstLoHiSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkBf8F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkBf8F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkF16Bf8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkF16Bf8OpGenericAdaptorBase::CvtScaleF32PkF16Bf8OpGenericAdaptorBase(CvtScaleF32PkF16Bf8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtScaleF32PkF16Bf8OpGenericAdaptorBase::getSrcLoHiSel() {
  auto attr = getSrcLoHiSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkF16Bf8OpAdaptor::CvtScaleF32PkF16Bf8OpAdaptor(CvtScaleF32PkF16Bf8Op op) : CvtScaleF32PkF16Bf8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkF16Bf8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_srcLoHiSel = getProperties().srcLoHiSel; (void)tblgen_srcLoHiSel;
  if (!tblgen_srcLoHiSel) return emitError(loc, "'rocdl.cvt.scalef32.pk.f16.bf8' op requires attribute 'srcLoHiSel'");

  if (tblgen_srcLoHiSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_srcLoHiSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_srcLoHiSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.f16.bf8' op attribute 'srcLoHiSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF16Bf8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.srcLoHiSel;
       auto attr = dict.get("srcLoHiSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `srcLoHiSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkF16Bf8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.srcLoHiSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("srcLoHiSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkF16Bf8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.srcLoHiSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkF16Bf8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "srcLoHiSel")
      return prop.srcLoHiSel;
  return std::nullopt;
}

void CvtScaleF32PkF16Bf8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "srcLoHiSel") {
       prop.srcLoHiSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.srcLoHiSel)>>(value);
       return;
    }
}

void CvtScaleF32PkF16Bf8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.srcLoHiSel) attrs.append("srcLoHiSel", prop.srcLoHiSel);
}

::llvm::LogicalResult CvtScaleF32PkF16Bf8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getSrcLoHiSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "srcLoHiSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF16Bf8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.srcLoHiSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkF16Bf8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.srcLoHiSel);
}

bool CvtScaleF32PkF16Bf8Op::getSrcLoHiSel() {
  auto attr = getSrcLoHiSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkF16Bf8Op::setSrcLoHiSel(bool attrValue) {
  getProperties().srcLoHiSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtScaleF32PkF16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = srcLoHiSel;
  odsState.addTypes(res);
}

CvtScaleF32PkF16Bf8Op CvtScaleF32PkF16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Bf8Op CvtScaleF32PkF16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  return create(builder, builder.getLoc(), res, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = srcLoHiSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF16Bf8Op CvtScaleF32PkF16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Bf8Op CvtScaleF32PkF16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), srcLoHiSel);
  odsState.addTypes(res);
}

CvtScaleF32PkF16Bf8Op CvtScaleF32PkF16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Bf8Op CvtScaleF32PkF16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  return create(builder, builder.getLoc(), res, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF16Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), srcLoHiSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF16Bf8Op CvtScaleF32PkF16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Bf8Op CvtScaleF32PkF16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF16Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkF16Bf8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkF16Bf8Op CvtScaleF32PkF16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Bf8Op CvtScaleF32PkF16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkF16Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF16Bf8Op CvtScaleF32PkF16Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Bf8Op CvtScaleF32PkF16Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkF16Bf8Op::verifyInvariantsImpl() {
  auto tblgen_srcLoHiSel = getProperties().srcLoHiSel; (void)tblgen_srcLoHiSel;
  if (!tblgen_srcLoHiSel) return emitOpError("requires attribute 'srcLoHiSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_srcLoHiSel, "srcLoHiSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps15(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF16Bf8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkF16Bf8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr srcLoHiSelAttr;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(srcLoHiSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (srcLoHiSelAttr) result.getOrAddProperties<CvtScaleF32PkF16Bf8Op::Properties>().srcLoHiSel = srcLoHiSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkF16Bf8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("srcLoHiSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getSrcLoHiSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkF16Bf8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkF16Bf8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkF16Fp4Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkF16Fp4OpGenericAdaptorBase::CvtScaleF32PkF16Fp4OpGenericAdaptorBase(CvtScaleF32PkF16Fp4Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32PkF16Fp4OpGenericAdaptorBase::getSrcSelIndex() {
  auto attr = getSrcSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkF16Fp4OpAdaptor::CvtScaleF32PkF16Fp4OpAdaptor(CvtScaleF32PkF16Fp4Op op) : CvtScaleF32PkF16Fp4OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkF16Fp4OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_srcSelIndex = getProperties().srcSelIndex; (void)tblgen_srcSelIndex;
  if (!tblgen_srcSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.pk.f16.fp4' op requires attribute 'srcSelIndex'");

  if (tblgen_srcSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_srcSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_srcSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.f16.fp4' op attribute 'srcSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF16Fp4Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.srcSelIndex;
       auto attr = dict.get("srcSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `srcSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkF16Fp4Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.srcSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("srcSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkF16Fp4Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.srcSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkF16Fp4Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "srcSelIndex")
      return prop.srcSelIndex;
  return std::nullopt;
}

void CvtScaleF32PkF16Fp4Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "srcSelIndex") {
       prop.srcSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.srcSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32PkF16Fp4Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.srcSelIndex) attrs.append("srcSelIndex", prop.srcSelIndex);
}

::llvm::LogicalResult CvtScaleF32PkF16Fp4Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getSrcSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "srcSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF16Fp4Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.srcSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkF16Fp4Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.srcSelIndex);
}

uint32_t CvtScaleF32PkF16Fp4Op::getSrcSelIndex() {
  auto attr = getSrcSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkF16Fp4Op::setSrcSelIndex(uint32_t attrValue) {
  getProperties().srcSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32PkF16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = srcSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32PkF16Fp4Op CvtScaleF32PkF16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Fp4Op CvtScaleF32PkF16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  return create(builder, builder.getLoc(), res, src, scale, srcSelIndex);
}

void CvtScaleF32PkF16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = srcSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF16Fp4Op CvtScaleF32PkF16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Fp4Op CvtScaleF32PkF16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcSelIndex);
}

void CvtScaleF32PkF16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), srcSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32PkF16Fp4Op CvtScaleF32PkF16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Fp4Op CvtScaleF32PkF16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  return create(builder, builder.getLoc(), res, src, scale, srcSelIndex);
}

void CvtScaleF32PkF16Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), srcSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF16Fp4Op CvtScaleF32PkF16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Fp4Op CvtScaleF32PkF16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcSelIndex);
}

void CvtScaleF32PkF16Fp4Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkF16Fp4Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkF16Fp4Op CvtScaleF32PkF16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Fp4Op CvtScaleF32PkF16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkF16Fp4Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF16Fp4Op CvtScaleF32PkF16Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Fp4Op CvtScaleF32PkF16Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkF16Fp4Op::verifyInvariantsImpl() {
  auto tblgen_srcSelIndex = getProperties().srcSelIndex; (void)tblgen_srcSelIndex;
  if (!tblgen_srcSelIndex) return emitOpError("requires attribute 'srcSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_srcSelIndex, "srcSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps15(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF16Fp4Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkF16Fp4Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr srcSelIndexAttr;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(srcSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (srcSelIndexAttr) result.getOrAddProperties<CvtScaleF32PkF16Fp4Op::Properties>().srcSelIndex = srcSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkF16Fp4Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("srcSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getSrcSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkF16Fp4Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkF16Fp4Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkF16Fp8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkF16Fp8OpGenericAdaptorBase::CvtScaleF32PkF16Fp8OpGenericAdaptorBase(CvtScaleF32PkF16Fp8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtScaleF32PkF16Fp8OpGenericAdaptorBase::getSrcLoHiSel() {
  auto attr = getSrcLoHiSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkF16Fp8OpAdaptor::CvtScaleF32PkF16Fp8OpAdaptor(CvtScaleF32PkF16Fp8Op op) : CvtScaleF32PkF16Fp8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkF16Fp8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_srcLoHiSel = getProperties().srcLoHiSel; (void)tblgen_srcLoHiSel;
  if (!tblgen_srcLoHiSel) return emitError(loc, "'rocdl.cvt.scalef32.pk.f16.fp8' op requires attribute 'srcLoHiSel'");

  if (tblgen_srcLoHiSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_srcLoHiSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_srcLoHiSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.f16.fp8' op attribute 'srcLoHiSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF16Fp8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.srcLoHiSel;
       auto attr = dict.get("srcLoHiSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `srcLoHiSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkF16Fp8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.srcLoHiSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("srcLoHiSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkF16Fp8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.srcLoHiSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkF16Fp8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "srcLoHiSel")
      return prop.srcLoHiSel;
  return std::nullopt;
}

void CvtScaleF32PkF16Fp8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "srcLoHiSel") {
       prop.srcLoHiSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.srcLoHiSel)>>(value);
       return;
    }
}

void CvtScaleF32PkF16Fp8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.srcLoHiSel) attrs.append("srcLoHiSel", prop.srcLoHiSel);
}

::llvm::LogicalResult CvtScaleF32PkF16Fp8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getSrcLoHiSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "srcLoHiSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF16Fp8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.srcLoHiSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkF16Fp8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.srcLoHiSel);
}

bool CvtScaleF32PkF16Fp8Op::getSrcLoHiSel() {
  auto attr = getSrcLoHiSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkF16Fp8Op::setSrcLoHiSel(bool attrValue) {
  getProperties().srcLoHiSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtScaleF32PkF16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = srcLoHiSel;
  odsState.addTypes(res);
}

CvtScaleF32PkF16Fp8Op CvtScaleF32PkF16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Fp8Op CvtScaleF32PkF16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  return create(builder, builder.getLoc(), res, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = srcLoHiSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF16Fp8Op CvtScaleF32PkF16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Fp8Op CvtScaleF32PkF16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), srcLoHiSel);
  odsState.addTypes(res);
}

CvtScaleF32PkF16Fp8Op CvtScaleF32PkF16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Fp8Op CvtScaleF32PkF16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  return create(builder, builder.getLoc(), res, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF16Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), srcLoHiSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF16Fp8Op CvtScaleF32PkF16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Fp8Op CvtScaleF32PkF16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF16Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkF16Fp8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkF16Fp8Op CvtScaleF32PkF16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Fp8Op CvtScaleF32PkF16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkF16Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF16Fp8Op CvtScaleF32PkF16Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF16Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF16Fp8Op CvtScaleF32PkF16Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkF16Fp8Op::verifyInvariantsImpl() {
  auto tblgen_srcLoHiSel = getProperties().srcLoHiSel; (void)tblgen_srcLoHiSel;
  if (!tblgen_srcLoHiSel) return emitOpError("requires attribute 'srcLoHiSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_srcLoHiSel, "srcLoHiSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps15(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF16Fp8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkF16Fp8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr srcLoHiSelAttr;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(srcLoHiSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (srcLoHiSelAttr) result.getOrAddProperties<CvtScaleF32PkF16Fp8Op::Properties>().srcLoHiSel = srcLoHiSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkF16Fp8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("srcLoHiSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getSrcLoHiSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkF16Fp8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkF16Fp8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkF32Bf8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkF32Bf8OpGenericAdaptorBase::CvtScaleF32PkF32Bf8OpGenericAdaptorBase(CvtScaleF32PkF32Bf8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtScaleF32PkF32Bf8OpGenericAdaptorBase::getSrcLoHiSel() {
  auto attr = getSrcLoHiSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkF32Bf8OpAdaptor::CvtScaleF32PkF32Bf8OpAdaptor(CvtScaleF32PkF32Bf8Op op) : CvtScaleF32PkF32Bf8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkF32Bf8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_srcLoHiSel = getProperties().srcLoHiSel; (void)tblgen_srcLoHiSel;
  if (!tblgen_srcLoHiSel) return emitError(loc, "'rocdl.cvt.scalef32.pk.f32.bf8' op requires attribute 'srcLoHiSel'");

  if (tblgen_srcLoHiSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_srcLoHiSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_srcLoHiSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.f32.bf8' op attribute 'srcLoHiSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF32Bf8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.srcLoHiSel;
       auto attr = dict.get("srcLoHiSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `srcLoHiSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkF32Bf8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.srcLoHiSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("srcLoHiSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkF32Bf8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.srcLoHiSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkF32Bf8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "srcLoHiSel")
      return prop.srcLoHiSel;
  return std::nullopt;
}

void CvtScaleF32PkF32Bf8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "srcLoHiSel") {
       prop.srcLoHiSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.srcLoHiSel)>>(value);
       return;
    }
}

void CvtScaleF32PkF32Bf8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.srcLoHiSel) attrs.append("srcLoHiSel", prop.srcLoHiSel);
}

::llvm::LogicalResult CvtScaleF32PkF32Bf8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getSrcLoHiSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "srcLoHiSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF32Bf8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.srcLoHiSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkF32Bf8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.srcLoHiSel);
}

bool CvtScaleF32PkF32Bf8Op::getSrcLoHiSel() {
  auto attr = getSrcLoHiSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkF32Bf8Op::setSrcLoHiSel(bool attrValue) {
  getProperties().srcLoHiSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtScaleF32PkF32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = srcLoHiSel;
  odsState.addTypes(res);
}

CvtScaleF32PkF32Bf8Op CvtScaleF32PkF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Bf8Op CvtScaleF32PkF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  return create(builder, builder.getLoc(), res, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = srcLoHiSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF32Bf8Op CvtScaleF32PkF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Bf8Op CvtScaleF32PkF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), srcLoHiSel);
  odsState.addTypes(res);
}

CvtScaleF32PkF32Bf8Op CvtScaleF32PkF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Bf8Op CvtScaleF32PkF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  return create(builder, builder.getLoc(), res, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF32Bf8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), srcLoHiSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF32Bf8Op CvtScaleF32PkF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Bf8Op CvtScaleF32PkF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF32Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkF32Bf8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkF32Bf8Op CvtScaleF32PkF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Bf8Op CvtScaleF32PkF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkF32Bf8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF32Bf8Op CvtScaleF32PkF32Bf8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Bf8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Bf8Op CvtScaleF32PkF32Bf8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkF32Bf8Op::verifyInvariantsImpl() {
  auto tblgen_srcLoHiSel = getProperties().srcLoHiSel; (void)tblgen_srcLoHiSel;
  if (!tblgen_srcLoHiSel) return emitOpError("requires attribute 'srcLoHiSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_srcLoHiSel, "srcLoHiSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps21(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF32Bf8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkF32Bf8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr srcLoHiSelAttr;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(srcLoHiSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (srcLoHiSelAttr) result.getOrAddProperties<CvtScaleF32PkF32Bf8Op::Properties>().srcLoHiSel = srcLoHiSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkF32Bf8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("srcLoHiSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getSrcLoHiSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkF32Bf8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkF32Bf8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkF32Fp4Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkF32Fp4OpGenericAdaptorBase::CvtScaleF32PkF32Fp4OpGenericAdaptorBase(CvtScaleF32PkF32Fp4Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32PkF32Fp4OpGenericAdaptorBase::getSrcSelIndex() {
  auto attr = getSrcSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkF32Fp4OpAdaptor::CvtScaleF32PkF32Fp4OpAdaptor(CvtScaleF32PkF32Fp4Op op) : CvtScaleF32PkF32Fp4OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkF32Fp4OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_srcSelIndex = getProperties().srcSelIndex; (void)tblgen_srcSelIndex;
  if (!tblgen_srcSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.pk.f32.fp4' op requires attribute 'srcSelIndex'");

  if (tblgen_srcSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_srcSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_srcSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.f32.fp4' op attribute 'srcSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF32Fp4Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.srcSelIndex;
       auto attr = dict.get("srcSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `srcSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkF32Fp4Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.srcSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("srcSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkF32Fp4Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.srcSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkF32Fp4Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "srcSelIndex")
      return prop.srcSelIndex;
  return std::nullopt;
}

void CvtScaleF32PkF32Fp4Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "srcSelIndex") {
       prop.srcSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.srcSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32PkF32Fp4Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.srcSelIndex) attrs.append("srcSelIndex", prop.srcSelIndex);
}

::llvm::LogicalResult CvtScaleF32PkF32Fp4Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getSrcSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "srcSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF32Fp4Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.srcSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkF32Fp4Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.srcSelIndex);
}

uint32_t CvtScaleF32PkF32Fp4Op::getSrcSelIndex() {
  auto attr = getSrcSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkF32Fp4Op::setSrcSelIndex(uint32_t attrValue) {
  getProperties().srcSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32PkF32Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = srcSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32PkF32Fp4Op CvtScaleF32PkF32Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Fp4Op CvtScaleF32PkF32Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  return create(builder, builder.getLoc(), res, src, scale, srcSelIndex);
}

void CvtScaleF32PkF32Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = srcSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF32Fp4Op CvtScaleF32PkF32Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Fp4Op CvtScaleF32PkF32Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcSelIndex);
}

void CvtScaleF32PkF32Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), srcSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32PkF32Fp4Op CvtScaleF32PkF32Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Fp4Op CvtScaleF32PkF32Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  return create(builder, builder.getLoc(), res, src, scale, srcSelIndex);
}

void CvtScaleF32PkF32Fp4Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), srcSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF32Fp4Op CvtScaleF32PkF32Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Fp4Op CvtScaleF32PkF32Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, uint32_t srcSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcSelIndex);
}

void CvtScaleF32PkF32Fp4Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkF32Fp4Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkF32Fp4Op CvtScaleF32PkF32Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Fp4Op CvtScaleF32PkF32Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkF32Fp4Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF32Fp4Op CvtScaleF32PkF32Fp4Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Fp4Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Fp4Op CvtScaleF32PkF32Fp4Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkF32Fp4Op::verifyInvariantsImpl() {
  auto tblgen_srcSelIndex = getProperties().srcSelIndex; (void)tblgen_srcSelIndex;
  if (!tblgen_srcSelIndex) return emitOpError("requires attribute 'srcSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_srcSelIndex, "srcSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps21(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF32Fp4Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkF32Fp4Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr srcSelIndexAttr;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(srcSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (srcSelIndexAttr) result.getOrAddProperties<CvtScaleF32PkF32Fp4Op::Properties>().srcSelIndex = srcSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkF32Fp4Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("srcSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getSrcSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkF32Fp4Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkF32Fp4Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkF32Fp8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkF32Fp8OpGenericAdaptorBase::CvtScaleF32PkF32Fp8OpGenericAdaptorBase(CvtScaleF32PkF32Fp8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtScaleF32PkF32Fp8OpGenericAdaptorBase::getSrcLoHiSel() {
  auto attr = getSrcLoHiSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkF32Fp8OpAdaptor::CvtScaleF32PkF32Fp8OpAdaptor(CvtScaleF32PkF32Fp8Op op) : CvtScaleF32PkF32Fp8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkF32Fp8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_srcLoHiSel = getProperties().srcLoHiSel; (void)tblgen_srcLoHiSel;
  if (!tblgen_srcLoHiSel) return emitError(loc, "'rocdl.cvt.scalef32.pk.f32.fp8' op requires attribute 'srcLoHiSel'");

  if (tblgen_srcLoHiSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_srcLoHiSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_srcLoHiSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.f32.fp8' op attribute 'srcLoHiSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF32Fp8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.srcLoHiSel;
       auto attr = dict.get("srcLoHiSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `srcLoHiSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkF32Fp8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.srcLoHiSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("srcLoHiSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkF32Fp8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.srcLoHiSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkF32Fp8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "srcLoHiSel")
      return prop.srcLoHiSel;
  return std::nullopt;
}

void CvtScaleF32PkF32Fp8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "srcLoHiSel") {
       prop.srcLoHiSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.srcLoHiSel)>>(value);
       return;
    }
}

void CvtScaleF32PkF32Fp8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.srcLoHiSel) attrs.append("srcLoHiSel", prop.srcLoHiSel);
}

::llvm::LogicalResult CvtScaleF32PkF32Fp8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getSrcLoHiSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "srcLoHiSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF32Fp8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.srcLoHiSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkF32Fp8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.srcLoHiSel);
}

bool CvtScaleF32PkF32Fp8Op::getSrcLoHiSel() {
  auto attr = getSrcLoHiSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkF32Fp8Op::setSrcLoHiSel(bool attrValue) {
  getProperties().srcLoHiSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtScaleF32PkF32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = srcLoHiSel;
  odsState.addTypes(res);
}

CvtScaleF32PkF32Fp8Op CvtScaleF32PkF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Fp8Op CvtScaleF32PkF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  return create(builder, builder.getLoc(), res, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = srcLoHiSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF32Fp8Op CvtScaleF32PkF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Fp8Op CvtScaleF32PkF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr srcLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), srcLoHiSel);
  odsState.addTypes(res);
}

CvtScaleF32PkF32Fp8Op CvtScaleF32PkF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Fp8Op CvtScaleF32PkF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  return create(builder, builder.getLoc(), res, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF32Fp8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().srcLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), srcLoHiSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF32Fp8Op CvtScaleF32PkF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, scale, srcLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Fp8Op CvtScaleF32PkF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value scale, bool srcLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, src, scale, srcLoHiSel);
}

void CvtScaleF32PkF32Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkF32Fp8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkF32Fp8Op CvtScaleF32PkF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Fp8Op CvtScaleF32PkF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkF32Fp8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkF32Fp8Op CvtScaleF32PkF32Fp8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkF32Fp8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkF32Fp8Op CvtScaleF32PkF32Fp8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkF32Fp8Op::verifyInvariantsImpl() {
  auto tblgen_srcLoHiSel = getProperties().srcLoHiSel; (void)tblgen_srcLoHiSel;
  if (!tblgen_srcLoHiSel) return emitOpError("requires attribute 'srcLoHiSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_srcLoHiSel, "srcLoHiSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps21(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkF32Fp8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkF32Fp8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr srcLoHiSelAttr;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(srcLoHiSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (srcLoHiSelAttr) result.getOrAddProperties<CvtScaleF32PkF32Fp8Op::Properties>().srcLoHiSel = srcLoHiSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkF32Fp8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("srcLoHiSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getSrcLoHiSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkF32Fp8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkF32Fp8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkFp4Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkFp4Bf16OpGenericAdaptorBase::CvtScaleF32PkFp4Bf16OpGenericAdaptorBase(CvtScaleF32PkFp4Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32PkFp4Bf16OpGenericAdaptorBase::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkFp4Bf16OpAdaptor::CvtScaleF32PkFp4Bf16OpAdaptor(CvtScaleF32PkFp4Bf16Op op) : CvtScaleF32PkFp4Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkFp4Bf16OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.pk.fp4.bf16' op requires attribute 'dstSelIndex'");

  if (tblgen_dstSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.fp4.bf16' op attribute 'dstSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp4Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstSelIndex;
       auto attr = dict.get("dstSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkFp4Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkFp4Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkFp4Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstSelIndex")
      return prop.dstSelIndex;
  return std::nullopt;
}

void CvtScaleF32PkFp4Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstSelIndex") {
       prop.dstSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32PkFp4Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstSelIndex) attrs.append("dstSelIndex", prop.dstSelIndex);
}

::llvm::LogicalResult CvtScaleF32PkFp4Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "dstSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp4Bf16Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkFp4Bf16Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstSelIndex);
}

uint32_t CvtScaleF32PkFp4Bf16Op::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkFp4Bf16Op::setDstSelIndex(uint32_t attrValue) {
  getProperties().dstSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32PkFp4Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32PkFp4Bf16Op CvtScaleF32PkFp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4Bf16Op CvtScaleF32PkFp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src, scale, dstSelIndex);
}

void CvtScaleF32PkFp4Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp4Bf16Op CvtScaleF32PkFp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4Bf16Op CvtScaleF32PkFp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src, scale, dstSelIndex);
}

void CvtScaleF32PkFp4Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32PkFp4Bf16Op CvtScaleF32PkFp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4Bf16Op CvtScaleF32PkFp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src, scale, dstSelIndex);
}

void CvtScaleF32PkFp4Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp4Bf16Op CvtScaleF32PkFp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4Bf16Op CvtScaleF32PkFp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src, scale, dstSelIndex);
}

void CvtScaleF32PkFp4Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkFp4Bf16Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkFp4Bf16Op CvtScaleF32PkFp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4Bf16Op CvtScaleF32PkFp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkFp4Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp4Bf16Op CvtScaleF32PkFp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4Bf16Op CvtScaleF32PkFp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkFp4Bf16Op::verifyInvariantsImpl() {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitOpError("requires attribute 'dstSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_dstSelIndex, "dstSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps19(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp4Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkFp4Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstSelIndexAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (dstSelIndexAttr) result.getOrAddProperties<CvtScaleF32PkFp4Bf16Op::Properties>().dstSelIndex = dstSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = ::mlir::VectorType::get({2} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcOperands, odsBuildableType1, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkFp4Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkFp4Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkFp4Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkFp4F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkFp4F16OpGenericAdaptorBase::CvtScaleF32PkFp4F16OpGenericAdaptorBase(CvtScaleF32PkFp4F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32PkFp4F16OpGenericAdaptorBase::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkFp4F16OpAdaptor::CvtScaleF32PkFp4F16OpAdaptor(CvtScaleF32PkFp4F16Op op) : CvtScaleF32PkFp4F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkFp4F16OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.pk.fp4.f16' op requires attribute 'dstSelIndex'");

  if (tblgen_dstSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.fp4.f16' op attribute 'dstSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp4F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstSelIndex;
       auto attr = dict.get("dstSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkFp4F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkFp4F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkFp4F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstSelIndex")
      return prop.dstSelIndex;
  return std::nullopt;
}

void CvtScaleF32PkFp4F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstSelIndex") {
       prop.dstSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32PkFp4F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstSelIndex) attrs.append("dstSelIndex", prop.dstSelIndex);
}

::llvm::LogicalResult CvtScaleF32PkFp4F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "dstSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp4F16Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkFp4F16Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstSelIndex);
}

uint32_t CvtScaleF32PkFp4F16Op::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkFp4F16Op::setDstSelIndex(uint32_t attrValue) {
  getProperties().dstSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32PkFp4F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32PkFp4F16Op CvtScaleF32PkFp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4F16Op CvtScaleF32PkFp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src, scale, dstSelIndex);
}

void CvtScaleF32PkFp4F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp4F16Op CvtScaleF32PkFp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4F16Op CvtScaleF32PkFp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src, scale, dstSelIndex);
}

void CvtScaleF32PkFp4F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32PkFp4F16Op CvtScaleF32PkFp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4F16Op CvtScaleF32PkFp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src, scale, dstSelIndex);
}

void CvtScaleF32PkFp4F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp4F16Op CvtScaleF32PkFp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4F16Op CvtScaleF32PkFp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src, scale, dstSelIndex);
}

void CvtScaleF32PkFp4F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkFp4F16Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkFp4F16Op CvtScaleF32PkFp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4F16Op CvtScaleF32PkFp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkFp4F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp4F16Op CvtScaleF32PkFp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4F16Op CvtScaleF32PkFp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkFp4F16Op::verifyInvariantsImpl() {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitOpError("requires attribute 'dstSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_dstSelIndex, "dstSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps15(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp4F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkFp4F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstSelIndexAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (dstSelIndexAttr) result.getOrAddProperties<CvtScaleF32PkFp4F16Op::Properties>().dstSelIndex = dstSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = ::mlir::VectorType::get({2} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcOperands, odsBuildableType1, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkFp4F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkFp4F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkFp4F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkFp4F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkFp4F32OpGenericAdaptorBase::CvtScaleF32PkFp4F32OpGenericAdaptorBase(CvtScaleF32PkFp4F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32PkFp4F32OpGenericAdaptorBase::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkFp4F32OpAdaptor::CvtScaleF32PkFp4F32OpAdaptor(CvtScaleF32PkFp4F32Op op) : CvtScaleF32PkFp4F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkFp4F32OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.pk.fp4.f32' op requires attribute 'dstSelIndex'");

  if (tblgen_dstSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.fp4.f32' op attribute 'dstSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp4F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstSelIndex;
       auto attr = dict.get("dstSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkFp4F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkFp4F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkFp4F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstSelIndex")
      return prop.dstSelIndex;
  return std::nullopt;
}

void CvtScaleF32PkFp4F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstSelIndex") {
       prop.dstSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32PkFp4F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstSelIndex) attrs.append("dstSelIndex", prop.dstSelIndex);
}

::llvm::LogicalResult CvtScaleF32PkFp4F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "dstSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp4F32Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkFp4F32Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstSelIndex);
}

uint32_t CvtScaleF32PkFp4F32Op::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkFp4F32Op::setDstSelIndex(uint32_t attrValue) {
  getProperties().dstSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32PkFp4F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32PkFp4F32Op CvtScaleF32PkFp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, src1, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4F32Op CvtScaleF32PkFp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, src1, scale, dstSelIndex);
}

void CvtScaleF32PkFp4F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp4F32Op CvtScaleF32PkFp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, src1, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4F32Op CvtScaleF32PkFp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, src1, scale, dstSelIndex);
}

void CvtScaleF32PkFp4F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32PkFp4F32Op CvtScaleF32PkFp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, src1, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4F32Op CvtScaleF32PkFp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, src1, scale, dstSelIndex);
}

void CvtScaleF32PkFp4F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp4F32Op CvtScaleF32PkFp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, src1, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4F32Op CvtScaleF32PkFp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, src1, scale, dstSelIndex);
}

void CvtScaleF32PkFp4F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkFp4F32Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkFp4F32Op CvtScaleF32PkFp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4F32Op CvtScaleF32PkFp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkFp4F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp4F32Op CvtScaleF32PkFp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp4F32Op CvtScaleF32PkFp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkFp4F32Op::verifyInvariantsImpl() {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitOpError("requires attribute 'dstSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_dstSelIndex, "dstSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp4F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkFp4F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand src1RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src1Operands(&src1RawOperand, 1);  ::llvm::SMLoc src1OperandsLoc;
  (void)src1OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstSelIndexAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  src1OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src1RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (dstSelIndexAttr) result.getOrAddProperties<CvtScaleF32PkFp4F32Op::Properties>().dstSelIndex = dstSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src0Operands, odsBuildableType1, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src1Operands, odsBuildableType1, src1OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkFp4F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc1();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkFp4F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkFp4F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkFp8Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkFp8Bf16OpGenericAdaptorBase::CvtScaleF32PkFp8Bf16OpGenericAdaptorBase(CvtScaleF32PkFp8Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtScaleF32PkFp8Bf16OpGenericAdaptorBase::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkFp8Bf16OpAdaptor::CvtScaleF32PkFp8Bf16OpAdaptor(CvtScaleF32PkFp8Bf16Op op) : CvtScaleF32PkFp8Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkFp8Bf16OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitError(loc, "'rocdl.cvt.scalef32.pk.fp8.bf16' op requires attribute 'dstLoHiSel'");

  if (tblgen_dstLoHiSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstLoHiSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstLoHiSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.fp8.bf16' op attribute 'dstLoHiSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp8Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstLoHiSel;
       auto attr = dict.get("dstLoHiSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstLoHiSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkFp8Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstLoHiSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstLoHiSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkFp8Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstLoHiSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkFp8Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstLoHiSel")
      return prop.dstLoHiSel;
  return std::nullopt;
}

void CvtScaleF32PkFp8Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstLoHiSel") {
       prop.dstLoHiSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstLoHiSel)>>(value);
       return;
    }
}

void CvtScaleF32PkFp8Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstLoHiSel) attrs.append("dstLoHiSel", prop.dstLoHiSel);
}

::llvm::LogicalResult CvtScaleF32PkFp8Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstLoHiSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "dstLoHiSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp8Bf16Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstLoHiSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkFp8Bf16Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstLoHiSel);
}

bool CvtScaleF32PkFp8Bf16Op::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkFp8Bf16Op::setDstLoHiSel(bool attrValue) {
  getProperties().dstLoHiSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtScaleF32PkFp8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  odsState.addTypes(res);
}

CvtScaleF32PkFp8Bf16Op CvtScaleF32PkFp8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8Bf16Op CvtScaleF32PkFp8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkFp8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp8Bf16Op CvtScaleF32PkFp8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8Bf16Op CvtScaleF32PkFp8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkFp8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  odsState.addTypes(res);
}

CvtScaleF32PkFp8Bf16Op CvtScaleF32PkFp8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8Bf16Op CvtScaleF32PkFp8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkFp8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp8Bf16Op CvtScaleF32PkFp8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8Bf16Op CvtScaleF32PkFp8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkFp8Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkFp8Bf16Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkFp8Bf16Op CvtScaleF32PkFp8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8Bf16Op CvtScaleF32PkFp8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkFp8Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp8Bf16Op CvtScaleF32PkFp8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8Bf16Op CvtScaleF32PkFp8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkFp8Bf16Op::verifyInvariantsImpl() {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitOpError("requires attribute 'dstLoHiSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_dstLoHiSel, "dstLoHiSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps20(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps19(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps20(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp8Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkFp8Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstLoHiSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstLoHiSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (dstLoHiSelAttr) result.getOrAddProperties<CvtScaleF32PkFp8Bf16Op::Properties>().dstLoHiSel = dstLoHiSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({2} ,parser.getBuilder().getIntegerType(16));
  ::mlir::Type odsBuildableType1 = ::mlir::VectorType::get({2} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src0Operands, odsBuildableType1, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkFp8Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstLoHiSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstLoHiSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkFp8Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkFp8Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkFp8F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkFp8F16OpGenericAdaptorBase::CvtScaleF32PkFp8F16OpGenericAdaptorBase(CvtScaleF32PkFp8F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtScaleF32PkFp8F16OpGenericAdaptorBase::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkFp8F16OpAdaptor::CvtScaleF32PkFp8F16OpAdaptor(CvtScaleF32PkFp8F16Op op) : CvtScaleF32PkFp8F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkFp8F16OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitError(loc, "'rocdl.cvt.scalef32.pk.fp8.f16' op requires attribute 'dstLoHiSel'");

  if (tblgen_dstLoHiSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstLoHiSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstLoHiSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.fp8.f16' op attribute 'dstLoHiSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp8F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstLoHiSel;
       auto attr = dict.get("dstLoHiSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstLoHiSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkFp8F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstLoHiSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstLoHiSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkFp8F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstLoHiSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkFp8F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstLoHiSel")
      return prop.dstLoHiSel;
  return std::nullopt;
}

void CvtScaleF32PkFp8F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstLoHiSel") {
       prop.dstLoHiSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstLoHiSel)>>(value);
       return;
    }
}

void CvtScaleF32PkFp8F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstLoHiSel) attrs.append("dstLoHiSel", prop.dstLoHiSel);
}

::llvm::LogicalResult CvtScaleF32PkFp8F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstLoHiSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "dstLoHiSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp8F16Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstLoHiSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkFp8F16Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstLoHiSel);
}

bool CvtScaleF32PkFp8F16Op::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkFp8F16Op::setDstLoHiSel(bool attrValue) {
  getProperties().dstLoHiSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtScaleF32PkFp8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  odsState.addTypes(res);
}

CvtScaleF32PkFp8F16Op CvtScaleF32PkFp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8F16Op CvtScaleF32PkFp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkFp8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp8F16Op CvtScaleF32PkFp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8F16Op CvtScaleF32PkFp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkFp8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  odsState.addTypes(res);
}

CvtScaleF32PkFp8F16Op CvtScaleF32PkFp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8F16Op CvtScaleF32PkFp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkFp8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp8F16Op CvtScaleF32PkFp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8F16Op CvtScaleF32PkFp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value scale, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, scale, dstLoHiSel);
}

void CvtScaleF32PkFp8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkFp8F16Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkFp8F16Op CvtScaleF32PkFp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8F16Op CvtScaleF32PkFp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkFp8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp8F16Op CvtScaleF32PkFp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8F16Op CvtScaleF32PkFp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkFp8F16Op::verifyInvariantsImpl() {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitOpError("requires attribute 'dstLoHiSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_dstLoHiSel, "dstLoHiSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps20(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps15(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps20(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp8F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkFp8F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstLoHiSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstLoHiSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (dstLoHiSelAttr) result.getOrAddProperties<CvtScaleF32PkFp8F16Op::Properties>().dstLoHiSel = dstLoHiSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({2} ,parser.getBuilder().getIntegerType(16));
  ::mlir::Type odsBuildableType1 = ::mlir::VectorType::get({2} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src0Operands, odsBuildableType1, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkFp8F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstLoHiSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstLoHiSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkFp8F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkFp8F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32PkFp8F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32PkFp8F32OpGenericAdaptorBase::CvtScaleF32PkFp8F32OpGenericAdaptorBase(CvtScaleF32PkFp8F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool CvtScaleF32PkFp8F32OpGenericAdaptorBase::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32PkFp8F32OpAdaptor::CvtScaleF32PkFp8F32OpAdaptor(CvtScaleF32PkFp8F32Op op) : CvtScaleF32PkFp8F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32PkFp8F32OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitError(loc, "'rocdl.cvt.scalef32.pk.fp8.f32' op requires attribute 'dstLoHiSel'");

  if (tblgen_dstLoHiSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstLoHiSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstLoHiSel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.cvt.scalef32.pk.fp8.f32' op attribute 'dstLoHiSel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp8F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstLoHiSel;
       auto attr = dict.get("dstLoHiSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstLoHiSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32PkFp8F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstLoHiSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstLoHiSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32PkFp8F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstLoHiSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32PkFp8F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstLoHiSel")
      return prop.dstLoHiSel;
  return std::nullopt;
}

void CvtScaleF32PkFp8F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstLoHiSel") {
       prop.dstLoHiSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstLoHiSel)>>(value);
       return;
    }
}

void CvtScaleF32PkFp8F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstLoHiSel) attrs.append("dstLoHiSel", prop.dstLoHiSel);
}

::llvm::LogicalResult CvtScaleF32PkFp8F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstLoHiSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "dstLoHiSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp8F32Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstLoHiSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkFp8F32Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstLoHiSel);
}

bool CvtScaleF32PkFp8F32Op::getDstLoHiSel() {
  auto attr = getDstLoHiSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32PkFp8F32Op::setDstLoHiSel(bool attrValue) {
  getProperties().dstLoHiSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void CvtScaleF32PkFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  odsState.addTypes(res);
}

CvtScaleF32PkFp8F32Op CvtScaleF32PkFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, src1, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8F32Op CvtScaleF32PkFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, src1, scale, dstLoHiSel);
}

void CvtScaleF32PkFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = dstLoHiSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp8F32Op CvtScaleF32PkFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, src1, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8F32Op CvtScaleF32PkFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, ::mlir::IntegerAttr dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, src1, scale, dstLoHiSel);
}

void CvtScaleF32PkFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  odsState.addTypes(res);
}

CvtScaleF32PkFp8F32Op CvtScaleF32PkFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, src1, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8F32Op CvtScaleF32PkFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, src1, scale, dstLoHiSel);
}

void CvtScaleF32PkFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, bool dstLoHiSel) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstLoHiSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), dstLoHiSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp8F32Op CvtScaleF32PkFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, bool dstLoHiSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, src1, scale, dstLoHiSel);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8F32Op CvtScaleF32PkFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value scale, bool dstLoHiSel) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, src1, scale, dstLoHiSel);
}

void CvtScaleF32PkFp8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32PkFp8F32Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32PkFp8F32Op CvtScaleF32PkFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8F32Op CvtScaleF32PkFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32PkFp8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32PkFp8F32Op CvtScaleF32PkFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32PkFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32PkFp8F32Op CvtScaleF32PkFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32PkFp8F32Op::verifyInvariantsImpl() {
  auto tblgen_dstLoHiSel = getProperties().dstLoHiSel; (void)tblgen_dstLoHiSel;
  if (!tblgen_dstLoHiSel) return emitOpError("requires attribute 'dstLoHiSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_dstLoHiSel, "dstLoHiSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps20(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps20(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32PkFp8F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32PkFp8F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand src1RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src1Operands(&src1RawOperand, 1);  ::llvm::SMLoc src1OperandsLoc;
  (void)src1OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstLoHiSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  src1OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src1RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstLoHiSelAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (dstLoHiSelAttr) result.getOrAddProperties<CvtScaleF32PkFp8F32Op::Properties>().dstLoHiSel = dstLoHiSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({2} ,parser.getBuilder().getIntegerType(16));
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src0Operands, odsBuildableType1, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src1Operands, odsBuildableType1, src1OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32PkFp8F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstLoHiSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc1();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstLoHiSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32PkFp8F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32PkFp8F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrBf8BF16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrBf8BF16OpGenericAdaptorBase::CvtScaleF32SrBf8BF16OpGenericAdaptorBase(CvtScaleF32SrBf8BF16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32SrBf8BF16OpGenericAdaptorBase::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32SrBf8BF16OpAdaptor::CvtScaleF32SrBf8BF16OpAdaptor(CvtScaleF32SrBf8BF16Op op) : CvtScaleF32SrBf8BF16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrBf8BF16OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.sr.bf8.bf16' op requires attribute 'dstSelIndex'");

  if (tblgen_dstSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.sr.bf8.bf16' op attribute 'dstSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrBf8BF16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstSelIndex;
       auto attr = dict.get("dstSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrBf8BF16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrBf8BF16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32SrBf8BF16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstSelIndex")
      return prop.dstSelIndex;
  return std::nullopt;
}

void CvtScaleF32SrBf8BF16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstSelIndex") {
       prop.dstSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32SrBf8BF16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstSelIndex) attrs.append("dstSelIndex", prop.dstSelIndex);
}

::llvm::LogicalResult CvtScaleF32SrBf8BF16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "dstSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrBf8BF16Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrBf8BF16Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstSelIndex);
}

uint32_t CvtScaleF32SrBf8BF16Op::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32SrBf8BF16Op::setDstSelIndex(uint32_t attrValue) {
  getProperties().dstSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32SrBf8BF16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32SrBf8BF16Op CvtScaleF32SrBf8BF16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8BF16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8BF16Op CvtScaleF32SrBf8BF16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrBf8BF16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrBf8BF16Op CvtScaleF32SrBf8BF16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8BF16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8BF16Op CvtScaleF32SrBf8BF16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrBf8BF16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32SrBf8BF16Op CvtScaleF32SrBf8BF16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8BF16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8BF16Op CvtScaleF32SrBf8BF16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrBf8BF16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrBf8BF16Op CvtScaleF32SrBf8BF16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8BF16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8BF16Op CvtScaleF32SrBf8BF16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrBf8BF16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32SrBf8BF16Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32SrBf8BF16Op CvtScaleF32SrBf8BF16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8BF16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8BF16Op CvtScaleF32SrBf8BF16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrBf8BF16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrBf8BF16Op CvtScaleF32SrBf8BF16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8BF16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8BF16Op CvtScaleF32SrBf8BF16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrBf8BF16Op::verifyInvariantsImpl() {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitOpError("requires attribute 'dstSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_dstSelIndex, "dstSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps22(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrBf8BF16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrBf8BF16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstSelIndexAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (dstSelIndexAttr) result.getOrAddProperties<CvtScaleF32SrBf8BF16Op::Properties>().dstSelIndex = dstSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getType<BFloat16Type>();
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src0Operands, odsBuildableType1, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType0, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrBf8BF16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrBf8BF16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrBf8BF16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrBf8F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrBf8F16OpGenericAdaptorBase::CvtScaleF32SrBf8F16OpGenericAdaptorBase(CvtScaleF32SrBf8F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32SrBf8F16OpGenericAdaptorBase::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32SrBf8F16OpAdaptor::CvtScaleF32SrBf8F16OpAdaptor(CvtScaleF32SrBf8F16Op op) : CvtScaleF32SrBf8F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrBf8F16OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.sr.bf8.f16' op requires attribute 'dstSelIndex'");

  if (tblgen_dstSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.sr.bf8.f16' op attribute 'dstSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrBf8F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstSelIndex;
       auto attr = dict.get("dstSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrBf8F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrBf8F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32SrBf8F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstSelIndex")
      return prop.dstSelIndex;
  return std::nullopt;
}

void CvtScaleF32SrBf8F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstSelIndex") {
       prop.dstSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32SrBf8F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstSelIndex) attrs.append("dstSelIndex", prop.dstSelIndex);
}

::llvm::LogicalResult CvtScaleF32SrBf8F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "dstSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrBf8F16Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrBf8F16Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstSelIndex);
}

uint32_t CvtScaleF32SrBf8F16Op::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32SrBf8F16Op::setDstSelIndex(uint32_t attrValue) {
  getProperties().dstSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32SrBf8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32SrBf8F16Op CvtScaleF32SrBf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8F16Op CvtScaleF32SrBf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrBf8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrBf8F16Op CvtScaleF32SrBf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8F16Op CvtScaleF32SrBf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrBf8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32SrBf8F16Op CvtScaleF32SrBf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8F16Op CvtScaleF32SrBf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrBf8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrBf8F16Op CvtScaleF32SrBf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8F16Op CvtScaleF32SrBf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrBf8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32SrBf8F16Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32SrBf8F16Op CvtScaleF32SrBf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8F16Op CvtScaleF32SrBf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrBf8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrBf8F16Op CvtScaleF32SrBf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8F16Op CvtScaleF32SrBf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrBf8F16Op::verifyInvariantsImpl() {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitOpError("requires attribute 'dstSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_dstSelIndex, "dstSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps23(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrBf8F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrBf8F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstSelIndexAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (dstSelIndexAttr) result.getOrAddProperties<CvtScaleF32SrBf8F16Op::Properties>().dstSelIndex = dstSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF16Type();
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src0Operands, odsBuildableType1, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType0, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrBf8F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrBf8F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrBf8F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrBf8F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrBf8F32OpGenericAdaptorBase::CvtScaleF32SrBf8F32OpGenericAdaptorBase(CvtScaleF32SrBf8F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32SrBf8F32OpGenericAdaptorBase::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32SrBf8F32OpAdaptor::CvtScaleF32SrBf8F32OpAdaptor(CvtScaleF32SrBf8F32Op op) : CvtScaleF32SrBf8F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrBf8F32OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.sr.bf8.f32' op requires attribute 'dstSelIndex'");

  if (tblgen_dstSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.sr.bf8.f32' op attribute 'dstSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrBf8F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstSelIndex;
       auto attr = dict.get("dstSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrBf8F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrBf8F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32SrBf8F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstSelIndex")
      return prop.dstSelIndex;
  return std::nullopt;
}

void CvtScaleF32SrBf8F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstSelIndex") {
       prop.dstSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32SrBf8F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstSelIndex) attrs.append("dstSelIndex", prop.dstSelIndex);
}

::llvm::LogicalResult CvtScaleF32SrBf8F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "dstSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrBf8F32Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrBf8F32Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstSelIndex);
}

uint32_t CvtScaleF32SrBf8F32Op::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32SrBf8F32Op::setDstSelIndex(uint32_t attrValue) {
  getProperties().dstSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32SrBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32SrBf8F32Op CvtScaleF32SrBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8F32Op CvtScaleF32SrBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrBf8F32Op CvtScaleF32SrBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8F32Op CvtScaleF32SrBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32SrBf8F32Op CvtScaleF32SrBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8F32Op CvtScaleF32SrBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrBf8F32Op CvtScaleF32SrBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8F32Op CvtScaleF32SrBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrBf8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32SrBf8F32Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32SrBf8F32Op CvtScaleF32SrBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8F32Op CvtScaleF32SrBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrBf8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrBf8F32Op CvtScaleF32SrBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrBf8F32Op CvtScaleF32SrBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrBf8F32Op::verifyInvariantsImpl() {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitOpError("requires attribute 'dstSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_dstSelIndex, "dstSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrBf8F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrBf8F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstSelIndexAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (dstSelIndexAttr) result.getOrAddProperties<CvtScaleF32SrBf8F32Op::Properties>().dstSelIndex = dstSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src0Operands, odsBuildableType1, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType0, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrBf8F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrBf8F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrBf8F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrFp8BF16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrFp8BF16OpGenericAdaptorBase::CvtScaleF32SrFp8BF16OpGenericAdaptorBase(CvtScaleF32SrFp8BF16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32SrFp8BF16OpGenericAdaptorBase::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32SrFp8BF16OpAdaptor::CvtScaleF32SrFp8BF16OpAdaptor(CvtScaleF32SrFp8BF16Op op) : CvtScaleF32SrFp8BF16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrFp8BF16OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.sr.fp8.bf16' op requires attribute 'dstSelIndex'");

  if (tblgen_dstSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.sr.fp8.bf16' op attribute 'dstSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrFp8BF16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstSelIndex;
       auto attr = dict.get("dstSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrFp8BF16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrFp8BF16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32SrFp8BF16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstSelIndex")
      return prop.dstSelIndex;
  return std::nullopt;
}

void CvtScaleF32SrFp8BF16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstSelIndex") {
       prop.dstSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32SrFp8BF16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstSelIndex) attrs.append("dstSelIndex", prop.dstSelIndex);
}

::llvm::LogicalResult CvtScaleF32SrFp8BF16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "dstSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrFp8BF16Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrFp8BF16Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstSelIndex);
}

uint32_t CvtScaleF32SrFp8BF16Op::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32SrFp8BF16Op::setDstSelIndex(uint32_t attrValue) {
  getProperties().dstSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32SrFp8BF16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32SrFp8BF16Op CvtScaleF32SrFp8BF16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8BF16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8BF16Op CvtScaleF32SrFp8BF16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrFp8BF16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrFp8BF16Op CvtScaleF32SrFp8BF16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8BF16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8BF16Op CvtScaleF32SrFp8BF16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrFp8BF16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32SrFp8BF16Op CvtScaleF32SrFp8BF16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8BF16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8BF16Op CvtScaleF32SrFp8BF16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrFp8BF16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrFp8BF16Op CvtScaleF32SrFp8BF16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8BF16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8BF16Op CvtScaleF32SrFp8BF16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrFp8BF16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32SrFp8BF16Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32SrFp8BF16Op CvtScaleF32SrFp8BF16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8BF16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8BF16Op CvtScaleF32SrFp8BF16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrFp8BF16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrFp8BF16Op CvtScaleF32SrFp8BF16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8BF16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8BF16Op CvtScaleF32SrFp8BF16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrFp8BF16Op::verifyInvariantsImpl() {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitOpError("requires attribute 'dstSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_dstSelIndex, "dstSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps22(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrFp8BF16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrFp8BF16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstSelIndexAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (dstSelIndexAttr) result.getOrAddProperties<CvtScaleF32SrFp8BF16Op::Properties>().dstSelIndex = dstSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getType<BFloat16Type>();
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src0Operands, odsBuildableType1, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType0, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrFp8BF16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrFp8BF16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrFp8BF16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrFp8F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrFp8F16OpGenericAdaptorBase::CvtScaleF32SrFp8F16OpGenericAdaptorBase(CvtScaleF32SrFp8F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32SrFp8F16OpGenericAdaptorBase::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32SrFp8F16OpAdaptor::CvtScaleF32SrFp8F16OpAdaptor(CvtScaleF32SrFp8F16Op op) : CvtScaleF32SrFp8F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrFp8F16OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.sr.fp8.f16' op requires attribute 'dstSelIndex'");

  if (tblgen_dstSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.sr.fp8.f16' op attribute 'dstSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrFp8F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstSelIndex;
       auto attr = dict.get("dstSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrFp8F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrFp8F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32SrFp8F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstSelIndex")
      return prop.dstSelIndex;
  return std::nullopt;
}

void CvtScaleF32SrFp8F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstSelIndex") {
       prop.dstSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32SrFp8F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstSelIndex) attrs.append("dstSelIndex", prop.dstSelIndex);
}

::llvm::LogicalResult CvtScaleF32SrFp8F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "dstSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrFp8F16Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrFp8F16Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstSelIndex);
}

uint32_t CvtScaleF32SrFp8F16Op::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32SrFp8F16Op::setDstSelIndex(uint32_t attrValue) {
  getProperties().dstSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32SrFp8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32SrFp8F16Op CvtScaleF32SrFp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8F16Op CvtScaleF32SrFp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrFp8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrFp8F16Op CvtScaleF32SrFp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8F16Op CvtScaleF32SrFp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrFp8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32SrFp8F16Op CvtScaleF32SrFp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8F16Op CvtScaleF32SrFp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrFp8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrFp8F16Op CvtScaleF32SrFp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8F16Op CvtScaleF32SrFp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrFp8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32SrFp8F16Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32SrFp8F16Op CvtScaleF32SrFp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8F16Op CvtScaleF32SrFp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrFp8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrFp8F16Op CvtScaleF32SrFp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8F16Op CvtScaleF32SrFp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrFp8F16Op::verifyInvariantsImpl() {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitOpError("requires attribute 'dstSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_dstSelIndex, "dstSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps23(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrFp8F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrFp8F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstSelIndexAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (dstSelIndexAttr) result.getOrAddProperties<CvtScaleF32SrFp8F16Op::Properties>().dstSelIndex = dstSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF16Type();
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src0Operands, odsBuildableType1, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType0, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrFp8F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrFp8F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrFp8F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrFp8F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrFp8F32OpGenericAdaptorBase::CvtScaleF32SrFp8F32OpGenericAdaptorBase(CvtScaleF32SrFp8F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32SrFp8F32OpGenericAdaptorBase::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32SrFp8F32OpAdaptor::CvtScaleF32SrFp8F32OpAdaptor(CvtScaleF32SrFp8F32Op op) : CvtScaleF32SrFp8F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrFp8F32OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.sr.fp8.f32' op requires attribute 'dstSelIndex'");

  if (tblgen_dstSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.sr.fp8.f32' op attribute 'dstSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrFp8F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstSelIndex;
       auto attr = dict.get("dstSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrFp8F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrFp8F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32SrFp8F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstSelIndex")
      return prop.dstSelIndex;
  return std::nullopt;
}

void CvtScaleF32SrFp8F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstSelIndex") {
       prop.dstSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32SrFp8F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstSelIndex) attrs.append("dstSelIndex", prop.dstSelIndex);
}

::llvm::LogicalResult CvtScaleF32SrFp8F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "dstSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrFp8F32Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrFp8F32Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstSelIndex);
}

uint32_t CvtScaleF32SrFp8F32Op::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32SrFp8F32Op::setDstSelIndex(uint32_t attrValue) {
  getProperties().dstSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32SrFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32SrFp8F32Op CvtScaleF32SrFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8F32Op CvtScaleF32SrFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrFp8F32Op CvtScaleF32SrFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8F32Op CvtScaleF32SrFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32SrFp8F32Op CvtScaleF32SrFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8F32Op CvtScaleF32SrFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src0);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrFp8F32Op CvtScaleF32SrFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8F32Op CvtScaleF32SrFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src0, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src0, seed, scale, dstSelIndex);
}

void CvtScaleF32SrFp8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32SrFp8F32Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32SrFp8F32Op CvtScaleF32SrFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8F32Op CvtScaleF32SrFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrFp8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrFp8F32Op CvtScaleF32SrFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrFp8F32Op CvtScaleF32SrFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrFp8F32Op::verifyInvariantsImpl() {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitOpError("requires attribute 'dstSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_dstSelIndex, "dstSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrFp8F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrFp8F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstSelIndexAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (dstSelIndexAttr) result.getOrAddProperties<CvtScaleF32SrFp8F32Op::Properties>().dstSelIndex = dstSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src0Operands, odsBuildableType1, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType0, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType1, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrFp8F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrFp8F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrFp8F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk16Bf6Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk16Bf6Bf16OpGenericAdaptorBase::CvtScaleF32SrPk16Bf6Bf16OpGenericAdaptorBase(CvtScaleF32SrPk16Bf6Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk16Bf6Bf16OpAdaptor::CvtScaleF32SrPk16Bf6Bf16OpAdaptor(CvtScaleF32SrPk16Bf6Bf16Op op) : CvtScaleF32SrPk16Bf6Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6Bf16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk16Bf6Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk16Bf6Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk16Bf6Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk16Bf6Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk16Bf6Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk16Bf6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk16Bf6Bf16Op CvtScaleF32SrPk16Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Bf6Bf16Op CvtScaleF32SrPk16Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk16Bf6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Bf6Bf16Op CvtScaleF32SrPk16Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Bf6Bf16Op CvtScaleF32SrPk16Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk16Bf6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Bf6Bf16Op CvtScaleF32SrPk16Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Bf6Bf16Op CvtScaleF32SrPk16Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk16Bf6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Bf6Bf16Op CvtScaleF32SrPk16Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Bf6Bf16Op CvtScaleF32SrPk16Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6Bf16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps7(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk16Bf6Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({16} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk16Bf6Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk16Bf6Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk16Bf6Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk16Bf6F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk16Bf6F16OpGenericAdaptorBase::CvtScaleF32SrPk16Bf6F16OpGenericAdaptorBase(CvtScaleF32SrPk16Bf6F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk16Bf6F16OpAdaptor::CvtScaleF32SrPk16Bf6F16OpAdaptor(CvtScaleF32SrPk16Bf6F16Op op) : CvtScaleF32SrPk16Bf6F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6F16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk16Bf6F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk16Bf6F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk16Bf6F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk16Bf6F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk16Bf6F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk16Bf6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk16Bf6F16Op CvtScaleF32SrPk16Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Bf6F16Op CvtScaleF32SrPk16Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk16Bf6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Bf6F16Op CvtScaleF32SrPk16Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Bf6F16Op CvtScaleF32SrPk16Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk16Bf6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Bf6F16Op CvtScaleF32SrPk16Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Bf6F16Op CvtScaleF32SrPk16Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk16Bf6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Bf6F16Op CvtScaleF32SrPk16Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Bf6F16Op CvtScaleF32SrPk16Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6F16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps8(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk16Bf6F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({16} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk16Bf6F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk16Bf6F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk16Bf6F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk16Bf6F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk16Bf6F32OpGenericAdaptorBase::CvtScaleF32SrPk16Bf6F32OpGenericAdaptorBase(CvtScaleF32SrPk16Bf6F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk16Bf6F32OpAdaptor::CvtScaleF32SrPk16Bf6F32OpAdaptor(CvtScaleF32SrPk16Bf6F32Op op) : CvtScaleF32SrPk16Bf6F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6F32OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk16Bf6F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk16Bf6F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk16Bf6F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk16Bf6F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk16Bf6F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk16Bf6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk16Bf6F32Op CvtScaleF32SrPk16Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Bf6F32Op CvtScaleF32SrPk16Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk16Bf6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Bf6F32Op CvtScaleF32SrPk16Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Bf6F32Op CvtScaleF32SrPk16Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk16Bf6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Bf6F32Op CvtScaleF32SrPk16Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Bf6F32Op CvtScaleF32SrPk16Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk16Bf6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Bf6F32Op CvtScaleF32SrPk16Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Bf6F32Op CvtScaleF32SrPk16Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6F32Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps9(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk16Bf6F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk16Bf6F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({16} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk16Bf6F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk16Bf6F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk16Bf6F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk16Fp6Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk16Fp6Bf16OpGenericAdaptorBase::CvtScaleF32SrPk16Fp6Bf16OpGenericAdaptorBase(CvtScaleF32SrPk16Fp6Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk16Fp6Bf16OpAdaptor::CvtScaleF32SrPk16Fp6Bf16OpAdaptor(CvtScaleF32SrPk16Fp6Bf16Op op) : CvtScaleF32SrPk16Fp6Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6Bf16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk16Fp6Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk16Fp6Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk16Fp6Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk16Fp6Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk16Fp6Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk16Fp6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk16Fp6Bf16Op CvtScaleF32SrPk16Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Fp6Bf16Op CvtScaleF32SrPk16Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk16Fp6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Fp6Bf16Op CvtScaleF32SrPk16Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Fp6Bf16Op CvtScaleF32SrPk16Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk16Fp6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Fp6Bf16Op CvtScaleF32SrPk16Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Fp6Bf16Op CvtScaleF32SrPk16Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk16Fp6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Fp6Bf16Op CvtScaleF32SrPk16Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Fp6Bf16Op CvtScaleF32SrPk16Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6Bf16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps7(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk16Fp6Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({16} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk16Fp6Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk16Fp6Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk16Fp6Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk16Fp6F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk16Fp6F16OpGenericAdaptorBase::CvtScaleF32SrPk16Fp6F16OpGenericAdaptorBase(CvtScaleF32SrPk16Fp6F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk16Fp6F16OpAdaptor::CvtScaleF32SrPk16Fp6F16OpAdaptor(CvtScaleF32SrPk16Fp6F16Op op) : CvtScaleF32SrPk16Fp6F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6F16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk16Fp6F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk16Fp6F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk16Fp6F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk16Fp6F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk16Fp6F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk16Fp6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk16Fp6F16Op CvtScaleF32SrPk16Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Fp6F16Op CvtScaleF32SrPk16Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk16Fp6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Fp6F16Op CvtScaleF32SrPk16Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Fp6F16Op CvtScaleF32SrPk16Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk16Fp6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Fp6F16Op CvtScaleF32SrPk16Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Fp6F16Op CvtScaleF32SrPk16Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk16Fp6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Fp6F16Op CvtScaleF32SrPk16Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Fp6F16Op CvtScaleF32SrPk16Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6F16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps8(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk16Fp6F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({16} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk16Fp6F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk16Fp6F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk16Fp6F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk16Fp6F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk16Fp6F32OpGenericAdaptorBase::CvtScaleF32SrPk16Fp6F32OpGenericAdaptorBase(CvtScaleF32SrPk16Fp6F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk16Fp6F32OpAdaptor::CvtScaleF32SrPk16Fp6F32OpAdaptor(CvtScaleF32SrPk16Fp6F32Op op) : CvtScaleF32SrPk16Fp6F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6F32OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk16Fp6F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk16Fp6F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk16Fp6F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk16Fp6F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk16Fp6F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk16Fp6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk16Fp6F32Op CvtScaleF32SrPk16Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Fp6F32Op CvtScaleF32SrPk16Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk16Fp6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Fp6F32Op CvtScaleF32SrPk16Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Fp6F32Op CvtScaleF32SrPk16Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk16Fp6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Fp6F32Op CvtScaleF32SrPk16Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Fp6F32Op CvtScaleF32SrPk16Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk16Fp6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk16Fp6F32Op CvtScaleF32SrPk16Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk16Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk16Fp6F32Op CvtScaleF32SrPk16Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6F32Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps9(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps6(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk16Fp6F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk16Fp6F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({16} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk16Fp6F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk16Fp6F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk16Fp6F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk32Bf6Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk32Bf6Bf16OpGenericAdaptorBase::CvtScaleF32SrPk32Bf6Bf16OpGenericAdaptorBase(CvtScaleF32SrPk32Bf6Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk32Bf6Bf16OpAdaptor::CvtScaleF32SrPk32Bf6Bf16OpAdaptor(CvtScaleF32SrPk32Bf6Bf16Op op) : CvtScaleF32SrPk32Bf6Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6Bf16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk32Bf6Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk32Bf6Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk32Bf6Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk32Bf6Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk32Bf6Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk32Bf6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk32Bf6Bf16Op CvtScaleF32SrPk32Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Bf6Bf16Op CvtScaleF32SrPk32Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk32Bf6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Bf6Bf16Op CvtScaleF32SrPk32Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Bf6Bf16Op CvtScaleF32SrPk32Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk32Bf6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Bf6Bf16Op CvtScaleF32SrPk32Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Bf6Bf16Op CvtScaleF32SrPk32Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk32Bf6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Bf6Bf16Op CvtScaleF32SrPk32Bf6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Bf6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Bf6Bf16Op CvtScaleF32SrPk32Bf6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6Bf16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps16(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk32Bf6Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({32} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk32Bf6Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk32Bf6Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk32Bf6Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk32Bf6F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk32Bf6F16OpGenericAdaptorBase::CvtScaleF32SrPk32Bf6F16OpGenericAdaptorBase(CvtScaleF32SrPk32Bf6F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk32Bf6F16OpAdaptor::CvtScaleF32SrPk32Bf6F16OpAdaptor(CvtScaleF32SrPk32Bf6F16Op op) : CvtScaleF32SrPk32Bf6F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6F16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk32Bf6F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk32Bf6F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk32Bf6F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk32Bf6F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk32Bf6F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk32Bf6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk32Bf6F16Op CvtScaleF32SrPk32Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Bf6F16Op CvtScaleF32SrPk32Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk32Bf6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Bf6F16Op CvtScaleF32SrPk32Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Bf6F16Op CvtScaleF32SrPk32Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk32Bf6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Bf6F16Op CvtScaleF32SrPk32Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Bf6F16Op CvtScaleF32SrPk32Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk32Bf6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Bf6F16Op CvtScaleF32SrPk32Bf6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Bf6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Bf6F16Op CvtScaleF32SrPk32Bf6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6F16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps17(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk32Bf6F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({32} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk32Bf6F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk32Bf6F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk32Bf6F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk32Bf6F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk32Bf6F32OpGenericAdaptorBase::CvtScaleF32SrPk32Bf6F32OpGenericAdaptorBase(CvtScaleF32SrPk32Bf6F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk32Bf6F32OpAdaptor::CvtScaleF32SrPk32Bf6F32OpAdaptor(CvtScaleF32SrPk32Bf6F32Op op) : CvtScaleF32SrPk32Bf6F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6F32OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk32Bf6F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk32Bf6F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk32Bf6F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk32Bf6F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk32Bf6F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk32Bf6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk32Bf6F32Op CvtScaleF32SrPk32Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Bf6F32Op CvtScaleF32SrPk32Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk32Bf6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Bf6F32Op CvtScaleF32SrPk32Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Bf6F32Op CvtScaleF32SrPk32Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk32Bf6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Bf6F32Op CvtScaleF32SrPk32Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Bf6F32Op CvtScaleF32SrPk32Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk32Bf6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Bf6F32Op CvtScaleF32SrPk32Bf6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Bf6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Bf6F32Op CvtScaleF32SrPk32Bf6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6F32Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps18(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk32Bf6F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk32Bf6F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({32} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk32Bf6F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk32Bf6F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk32Bf6F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk32Fp6Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk32Fp6Bf16OpGenericAdaptorBase::CvtScaleF32SrPk32Fp6Bf16OpGenericAdaptorBase(CvtScaleF32SrPk32Fp6Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk32Fp6Bf16OpAdaptor::CvtScaleF32SrPk32Fp6Bf16OpAdaptor(CvtScaleF32SrPk32Fp6Bf16Op op) : CvtScaleF32SrPk32Fp6Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6Bf16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk32Fp6Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk32Fp6Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk32Fp6Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk32Fp6Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk32Fp6Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk32Fp6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk32Fp6Bf16Op CvtScaleF32SrPk32Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Fp6Bf16Op CvtScaleF32SrPk32Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk32Fp6Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Fp6Bf16Op CvtScaleF32SrPk32Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Fp6Bf16Op CvtScaleF32SrPk32Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk32Fp6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Fp6Bf16Op CvtScaleF32SrPk32Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Fp6Bf16Op CvtScaleF32SrPk32Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk32Fp6Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Fp6Bf16Op CvtScaleF32SrPk32Fp6Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Fp6Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Fp6Bf16Op CvtScaleF32SrPk32Fp6Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6Bf16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps16(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk32Fp6Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({32} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk32Fp6Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk32Fp6Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk32Fp6Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk32Fp6F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk32Fp6F16OpGenericAdaptorBase::CvtScaleF32SrPk32Fp6F16OpGenericAdaptorBase(CvtScaleF32SrPk32Fp6F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk32Fp6F16OpAdaptor::CvtScaleF32SrPk32Fp6F16OpAdaptor(CvtScaleF32SrPk32Fp6F16Op op) : CvtScaleF32SrPk32Fp6F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6F16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk32Fp6F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk32Fp6F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk32Fp6F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk32Fp6F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk32Fp6F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk32Fp6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk32Fp6F16Op CvtScaleF32SrPk32Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Fp6F16Op CvtScaleF32SrPk32Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk32Fp6F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Fp6F16Op CvtScaleF32SrPk32Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Fp6F16Op CvtScaleF32SrPk32Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk32Fp6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Fp6F16Op CvtScaleF32SrPk32Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Fp6F16Op CvtScaleF32SrPk32Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk32Fp6F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Fp6F16Op CvtScaleF32SrPk32Fp6F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Fp6F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Fp6F16Op CvtScaleF32SrPk32Fp6F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6F16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps17(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk32Fp6F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({32} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk32Fp6F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk32Fp6F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk32Fp6F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk32Fp6F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk32Fp6F32OpGenericAdaptorBase::CvtScaleF32SrPk32Fp6F32OpGenericAdaptorBase(CvtScaleF32SrPk32Fp6F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk32Fp6F32OpAdaptor::CvtScaleF32SrPk32Fp6F32OpAdaptor(CvtScaleF32SrPk32Fp6F32Op op) : CvtScaleF32SrPk32Fp6F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6F32OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk32Fp6F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk32Fp6F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk32Fp6F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk32Fp6F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk32Fp6F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk32Fp6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk32Fp6F32Op CvtScaleF32SrPk32Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Fp6F32Op CvtScaleF32SrPk32Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk32Fp6F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Fp6F32Op CvtScaleF32SrPk32Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Fp6F32Op CvtScaleF32SrPk32Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk32Fp6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Fp6F32Op CvtScaleF32SrPk32Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Fp6F32Op CvtScaleF32SrPk32Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk32Fp6F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk32Fp6F32Op CvtScaleF32SrPk32Fp6F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk32Fp6F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk32Fp6F32Op CvtScaleF32SrPk32Fp6F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6F32Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps18(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps14(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk32Fp6F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk32Fp6F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({32} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk32Fp6F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk32Fp6F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk32Fp6F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk8Bf8Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk8Bf8Bf16OpGenericAdaptorBase::CvtScaleF32SrPk8Bf8Bf16OpGenericAdaptorBase(CvtScaleF32SrPk8Bf8Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk8Bf8Bf16OpAdaptor::CvtScaleF32SrPk8Bf8Bf16OpAdaptor(CvtScaleF32SrPk8Bf8Bf16Op op) : CvtScaleF32SrPk8Bf8Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8Bf16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk8Bf8Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk8Bf8Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk8Bf8Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk8Bf8Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk8Bf8Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk8Bf8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk8Bf8Bf16Op CvtScaleF32SrPk8Bf8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Bf8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Bf8Bf16Op CvtScaleF32SrPk8Bf8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk8Bf8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Bf8Bf16Op CvtScaleF32SrPk8Bf8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Bf8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Bf8Bf16Op CvtScaleF32SrPk8Bf8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk8Bf8Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Bf8Bf16Op CvtScaleF32SrPk8Bf8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Bf8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Bf8Bf16Op CvtScaleF32SrPk8Bf8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk8Bf8Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Bf8Bf16Op CvtScaleF32SrPk8Bf8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Bf8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Bf8Bf16Op CvtScaleF32SrPk8Bf8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8Bf16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps11(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk8Bf8Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk8Bf8Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk8Bf8Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk8Bf8Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk8Bf8F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk8Bf8F16OpGenericAdaptorBase::CvtScaleF32SrPk8Bf8F16OpGenericAdaptorBase(CvtScaleF32SrPk8Bf8F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk8Bf8F16OpAdaptor::CvtScaleF32SrPk8Bf8F16OpAdaptor(CvtScaleF32SrPk8Bf8F16Op op) : CvtScaleF32SrPk8Bf8F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8F16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk8Bf8F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk8Bf8F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk8Bf8F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk8Bf8F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk8Bf8F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk8Bf8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk8Bf8F16Op CvtScaleF32SrPk8Bf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Bf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Bf8F16Op CvtScaleF32SrPk8Bf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk8Bf8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Bf8F16Op CvtScaleF32SrPk8Bf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Bf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Bf8F16Op CvtScaleF32SrPk8Bf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk8Bf8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Bf8F16Op CvtScaleF32SrPk8Bf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Bf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Bf8F16Op CvtScaleF32SrPk8Bf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk8Bf8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Bf8F16Op CvtScaleF32SrPk8Bf8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Bf8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Bf8F16Op CvtScaleF32SrPk8Bf8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8F16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps12(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk8Bf8F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk8Bf8F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk8Bf8F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk8Bf8F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk8Bf8F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk8Bf8F32OpGenericAdaptorBase::CvtScaleF32SrPk8Bf8F32OpGenericAdaptorBase(CvtScaleF32SrPk8Bf8F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk8Bf8F32OpAdaptor::CvtScaleF32SrPk8Bf8F32OpAdaptor(CvtScaleF32SrPk8Bf8F32Op op) : CvtScaleF32SrPk8Bf8F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8F32OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk8Bf8F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk8Bf8F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk8Bf8F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk8Bf8F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk8Bf8F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk8Bf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk8Bf8F32Op CvtScaleF32SrPk8Bf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Bf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Bf8F32Op CvtScaleF32SrPk8Bf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk8Bf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Bf8F32Op CvtScaleF32SrPk8Bf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Bf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Bf8F32Op CvtScaleF32SrPk8Bf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk8Bf8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Bf8F32Op CvtScaleF32SrPk8Bf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Bf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Bf8F32Op CvtScaleF32SrPk8Bf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk8Bf8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Bf8F32Op CvtScaleF32SrPk8Bf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Bf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Bf8F32Op CvtScaleF32SrPk8Bf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8F32Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps13(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Bf8F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk8Bf8F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk8Bf8F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk8Bf8F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk8Bf8F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk8Fp4Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk8Fp4Bf16OpGenericAdaptorBase::CvtScaleF32SrPk8Fp4Bf16OpGenericAdaptorBase(CvtScaleF32SrPk8Fp4Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk8Fp4Bf16OpAdaptor::CvtScaleF32SrPk8Fp4Bf16OpAdaptor(CvtScaleF32SrPk8Fp4Bf16Op op) : CvtScaleF32SrPk8Fp4Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4Bf16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk8Fp4Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk8Fp4Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk8Fp4Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk8Fp4Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk8Fp4Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk8Fp4Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk8Fp4Bf16Op CvtScaleF32SrPk8Fp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp4Bf16Op CvtScaleF32SrPk8Fp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk8Fp4Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp4Bf16Op CvtScaleF32SrPk8Fp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp4Bf16Op CvtScaleF32SrPk8Fp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk8Fp4Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp4Bf16Op CvtScaleF32SrPk8Fp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp4Bf16Op CvtScaleF32SrPk8Fp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk8Fp4Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp4Bf16Op CvtScaleF32SrPk8Fp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp4Bf16Op CvtScaleF32SrPk8Fp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4Bf16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps11(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk8Fp4Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk8Fp4Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk8Fp4Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk8Fp4Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk8Fp4F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk8Fp4F16OpGenericAdaptorBase::CvtScaleF32SrPk8Fp4F16OpGenericAdaptorBase(CvtScaleF32SrPk8Fp4F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk8Fp4F16OpAdaptor::CvtScaleF32SrPk8Fp4F16OpAdaptor(CvtScaleF32SrPk8Fp4F16Op op) : CvtScaleF32SrPk8Fp4F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4F16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk8Fp4F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk8Fp4F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk8Fp4F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk8Fp4F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk8Fp4F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk8Fp4F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk8Fp4F16Op CvtScaleF32SrPk8Fp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp4F16Op CvtScaleF32SrPk8Fp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk8Fp4F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp4F16Op CvtScaleF32SrPk8Fp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp4F16Op CvtScaleF32SrPk8Fp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk8Fp4F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp4F16Op CvtScaleF32SrPk8Fp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp4F16Op CvtScaleF32SrPk8Fp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk8Fp4F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp4F16Op CvtScaleF32SrPk8Fp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp4F16Op CvtScaleF32SrPk8Fp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4F16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps12(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk8Fp4F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk8Fp4F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk8Fp4F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk8Fp4F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk8Fp4F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk8Fp4F32OpGenericAdaptorBase::CvtScaleF32SrPk8Fp4F32OpGenericAdaptorBase(CvtScaleF32SrPk8Fp4F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk8Fp4F32OpAdaptor::CvtScaleF32SrPk8Fp4F32OpAdaptor(CvtScaleF32SrPk8Fp4F32Op op) : CvtScaleF32SrPk8Fp4F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4F32OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk8Fp4F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk8Fp4F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk8Fp4F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk8Fp4F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk8Fp4F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk8Fp4F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk8Fp4F32Op CvtScaleF32SrPk8Fp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp4F32Op CvtScaleF32SrPk8Fp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk8Fp4F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp4F32Op CvtScaleF32SrPk8Fp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp4F32Op CvtScaleF32SrPk8Fp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk8Fp4F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp4F32Op CvtScaleF32SrPk8Fp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp4F32Op CvtScaleF32SrPk8Fp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk8Fp4F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp4F32Op CvtScaleF32SrPk8Fp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp4F32Op CvtScaleF32SrPk8Fp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4F32Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps13(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp4F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk8Fp4F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk8Fp4F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk8Fp4F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk8Fp4F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk8Fp8Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk8Fp8Bf16OpGenericAdaptorBase::CvtScaleF32SrPk8Fp8Bf16OpGenericAdaptorBase(CvtScaleF32SrPk8Fp8Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk8Fp8Bf16OpAdaptor::CvtScaleF32SrPk8Fp8Bf16OpAdaptor(CvtScaleF32SrPk8Fp8Bf16Op op) : CvtScaleF32SrPk8Fp8Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8Bf16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk8Fp8Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk8Fp8Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk8Fp8Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk8Fp8Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk8Fp8Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk8Fp8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk8Fp8Bf16Op CvtScaleF32SrPk8Fp8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp8Bf16Op CvtScaleF32SrPk8Fp8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk8Fp8Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp8Bf16Op CvtScaleF32SrPk8Fp8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp8Bf16Op CvtScaleF32SrPk8Fp8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk8Fp8Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp8Bf16Op CvtScaleF32SrPk8Fp8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp8Bf16Op CvtScaleF32SrPk8Fp8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk8Fp8Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp8Bf16Op CvtScaleF32SrPk8Fp8Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp8Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp8Bf16Op CvtScaleF32SrPk8Fp8Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8Bf16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps11(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk8Fp8Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk8Fp8Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk8Fp8Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk8Fp8Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk8Fp8F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk8Fp8F16OpGenericAdaptorBase::CvtScaleF32SrPk8Fp8F16OpGenericAdaptorBase(CvtScaleF32SrPk8Fp8F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk8Fp8F16OpAdaptor::CvtScaleF32SrPk8Fp8F16OpAdaptor(CvtScaleF32SrPk8Fp8F16Op op) : CvtScaleF32SrPk8Fp8F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8F16OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk8Fp8F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk8Fp8F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk8Fp8F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk8Fp8F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk8Fp8F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk8Fp8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk8Fp8F16Op CvtScaleF32SrPk8Fp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp8F16Op CvtScaleF32SrPk8Fp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk8Fp8F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp8F16Op CvtScaleF32SrPk8Fp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp8F16Op CvtScaleF32SrPk8Fp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk8Fp8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp8F16Op CvtScaleF32SrPk8Fp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp8F16Op CvtScaleF32SrPk8Fp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk8Fp8F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp8F16Op CvtScaleF32SrPk8Fp8F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp8F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp8F16Op CvtScaleF32SrPk8Fp8F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8F16Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps12(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk8Fp8F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk8Fp8F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk8Fp8F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk8Fp8F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPk8Fp8F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPk8Fp8F32OpGenericAdaptorBase::CvtScaleF32SrPk8Fp8F32OpGenericAdaptorBase(CvtScaleF32SrPk8Fp8F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
CvtScaleF32SrPk8Fp8F32OpAdaptor::CvtScaleF32SrPk8Fp8F32OpAdaptor(CvtScaleF32SrPk8Fp8F32Op op) : CvtScaleF32SrPk8Fp8F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8F32OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPk8Fp8F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPk8Fp8F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> CvtScaleF32SrPk8Fp8F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void CvtScaleF32SrPk8Fp8F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void CvtScaleF32SrPk8Fp8F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void CvtScaleF32SrPk8Fp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.addTypes(res);
}

CvtScaleF32SrPk8Fp8F32Op CvtScaleF32SrPk8Fp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp8F32Op CvtScaleF32SrPk8Fp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), res, src, seed, scale);
}

void CvtScaleF32SrPk8Fp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp8F32Op CvtScaleF32SrPk8Fp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, seed, scale);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp8F32Op CvtScaleF32SrPk8Fp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale) {
  return create(builder, builder.getLoc(), resultTypes, src, seed, scale);
}

void CvtScaleF32SrPk8Fp8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp8F32Op CvtScaleF32SrPk8Fp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp8F32Op CvtScaleF32SrPk8Fp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPk8Fp8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPk8Fp8F32Op CvtScaleF32SrPk8Fp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPk8Fp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPk8Fp8F32Op CvtScaleF32SrPk8Fp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8F32Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps13(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps10(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPk8Fp8F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPk8Fp8F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({8} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, odsBuildableType0, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType1, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPk8Fp8F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPk8Fp8F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPk8Fp8F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPkFp4Bf16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPkFp4Bf16OpGenericAdaptorBase::CvtScaleF32SrPkFp4Bf16OpGenericAdaptorBase(CvtScaleF32SrPkFp4Bf16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32SrPkFp4Bf16OpGenericAdaptorBase::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32SrPkFp4Bf16OpAdaptor::CvtScaleF32SrPkFp4Bf16OpAdaptor(CvtScaleF32SrPkFp4Bf16Op op) : CvtScaleF32SrPkFp4Bf16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPkFp4Bf16OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.sr.pk.fp4.bf16' op requires attribute 'dstSelIndex'");

  if (tblgen_dstSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.sr.pk.fp4.bf16' op attribute 'dstSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPkFp4Bf16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstSelIndex;
       auto attr = dict.get("dstSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPkFp4Bf16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPkFp4Bf16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32SrPkFp4Bf16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstSelIndex")
      return prop.dstSelIndex;
  return std::nullopt;
}

void CvtScaleF32SrPkFp4Bf16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstSelIndex") {
       prop.dstSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32SrPkFp4Bf16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstSelIndex) attrs.append("dstSelIndex", prop.dstSelIndex);
}

::llvm::LogicalResult CvtScaleF32SrPkFp4Bf16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "dstSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPkFp4Bf16Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPkFp4Bf16Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstSelIndex);
}

uint32_t CvtScaleF32SrPkFp4Bf16Op::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32SrPkFp4Bf16Op::setDstSelIndex(uint32_t attrValue) {
  getProperties().dstSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32SrPkFp4Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32SrPkFp4Bf16Op CvtScaleF32SrPkFp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4Bf16Op CvtScaleF32SrPkFp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src, seed, scale, dstSelIndex);
}

void CvtScaleF32SrPkFp4Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPkFp4Bf16Op CvtScaleF32SrPkFp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4Bf16Op CvtScaleF32SrPkFp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src, seed, scale, dstSelIndex);
}

void CvtScaleF32SrPkFp4Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32SrPkFp4Bf16Op CvtScaleF32SrPkFp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4Bf16Op CvtScaleF32SrPkFp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src, seed, scale, dstSelIndex);
}

void CvtScaleF32SrPkFp4Bf16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPkFp4Bf16Op CvtScaleF32SrPkFp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4Bf16Op CvtScaleF32SrPkFp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src, seed, scale, dstSelIndex);
}

void CvtScaleF32SrPkFp4Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32SrPkFp4Bf16Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32SrPkFp4Bf16Op CvtScaleF32SrPkFp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4Bf16Op CvtScaleF32SrPkFp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPkFp4Bf16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPkFp4Bf16Op CvtScaleF32SrPkFp4Bf16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4Bf16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4Bf16Op CvtScaleF32SrPkFp4Bf16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPkFp4Bf16Op::verifyInvariantsImpl() {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitOpError("requires attribute 'dstSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_dstSelIndex, "dstSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps19(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPkFp4Bf16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPkFp4Bf16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstSelIndexAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (dstSelIndexAttr) result.getOrAddProperties<CvtScaleF32SrPkFp4Bf16Op::Properties>().dstSelIndex = dstSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = ::mlir::VectorType::get({2} ,parser.getBuilder().getType<BFloat16Type>());
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcOperands, odsBuildableType1, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType0, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPkFp4Bf16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPkFp4Bf16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPkFp4Bf16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPkFp4F16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPkFp4F16OpGenericAdaptorBase::CvtScaleF32SrPkFp4F16OpGenericAdaptorBase(CvtScaleF32SrPkFp4F16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32SrPkFp4F16OpGenericAdaptorBase::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32SrPkFp4F16OpAdaptor::CvtScaleF32SrPkFp4F16OpAdaptor(CvtScaleF32SrPkFp4F16Op op) : CvtScaleF32SrPkFp4F16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPkFp4F16OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.sr.pk.fp4.f16' op requires attribute 'dstSelIndex'");

  if (tblgen_dstSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.sr.pk.fp4.f16' op attribute 'dstSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPkFp4F16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstSelIndex;
       auto attr = dict.get("dstSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPkFp4F16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPkFp4F16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32SrPkFp4F16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstSelIndex")
      return prop.dstSelIndex;
  return std::nullopt;
}

void CvtScaleF32SrPkFp4F16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstSelIndex") {
       prop.dstSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32SrPkFp4F16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstSelIndex) attrs.append("dstSelIndex", prop.dstSelIndex);
}

::llvm::LogicalResult CvtScaleF32SrPkFp4F16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "dstSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPkFp4F16Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPkFp4F16Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstSelIndex);
}

uint32_t CvtScaleF32SrPkFp4F16Op::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32SrPkFp4F16Op::setDstSelIndex(uint32_t attrValue) {
  getProperties().dstSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32SrPkFp4F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32SrPkFp4F16Op CvtScaleF32SrPkFp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4F16Op CvtScaleF32SrPkFp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src, seed, scale, dstSelIndex);
}

void CvtScaleF32SrPkFp4F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPkFp4F16Op CvtScaleF32SrPkFp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4F16Op CvtScaleF32SrPkFp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src, seed, scale, dstSelIndex);
}

void CvtScaleF32SrPkFp4F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32SrPkFp4F16Op CvtScaleF32SrPkFp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4F16Op CvtScaleF32SrPkFp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src, seed, scale, dstSelIndex);
}

void CvtScaleF32SrPkFp4F16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPkFp4F16Op CvtScaleF32SrPkFp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4F16Op CvtScaleF32SrPkFp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src, seed, scale, dstSelIndex);
}

void CvtScaleF32SrPkFp4F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32SrPkFp4F16Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32SrPkFp4F16Op CvtScaleF32SrPkFp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4F16Op CvtScaleF32SrPkFp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPkFp4F16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPkFp4F16Op CvtScaleF32SrPkFp4F16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4F16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4F16Op CvtScaleF32SrPkFp4F16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPkFp4F16Op::verifyInvariantsImpl() {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitOpError("requires attribute 'dstSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_dstSelIndex, "dstSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps15(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPkFp4F16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPkFp4F16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstSelIndexAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (dstSelIndexAttr) result.getOrAddProperties<CvtScaleF32SrPkFp4F16Op::Properties>().dstSelIndex = dstSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = ::mlir::VectorType::get({2} ,parser.getBuilder().getF16Type());
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcOperands, odsBuildableType1, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType0, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPkFp4F16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPkFp4F16Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPkFp4F16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtScaleF32SrPkFp4F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtScaleF32SrPkFp4F32OpGenericAdaptorBase::CvtScaleF32SrPkFp4F32OpGenericAdaptorBase(CvtScaleF32SrPkFp4F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtScaleF32SrPkFp4F32OpGenericAdaptorBase::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtScaleF32SrPkFp4F32OpAdaptor::CvtScaleF32SrPkFp4F32OpAdaptor(CvtScaleF32SrPkFp4F32Op op) : CvtScaleF32SrPkFp4F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtScaleF32SrPkFp4F32OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitError(loc, "'rocdl.cvt.scalef32.sr.pk.fp4.f32' op requires attribute 'dstSelIndex'");

  if (tblgen_dstSelIndex && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dstSelIndex))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dstSelIndex).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.scalef32.sr.pk.fp4.f32' op attribute 'dstSelIndex' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPkFp4F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.dstSelIndex;
       auto attr = dict.get("dstSelIndex");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dstSelIndex` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtScaleF32SrPkFp4F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.dstSelIndex;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dstSelIndex",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtScaleF32SrPkFp4F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.dstSelIndex.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtScaleF32SrPkFp4F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "dstSelIndex")
      return prop.dstSelIndex;
  return std::nullopt;
}

void CvtScaleF32SrPkFp4F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "dstSelIndex") {
       prop.dstSelIndex = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dstSelIndex)>>(value);
       return;
    }
}

void CvtScaleF32SrPkFp4F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.dstSelIndex) attrs.append("dstSelIndex", prop.dstSelIndex);
}

::llvm::LogicalResult CvtScaleF32SrPkFp4F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getDstSelIndexAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "dstSelIndex", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPkFp4F32Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.dstSelIndex)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPkFp4F32Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.dstSelIndex);
}

uint32_t CvtScaleF32SrPkFp4F32Op::getDstSelIndex() {
  auto attr = getDstSelIndexAttr();
  return attr.getValue().getZExtValue();
}

void CvtScaleF32SrPkFp4F32Op::setDstSelIndex(uint32_t attrValue) {
  getProperties().dstSelIndex = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtScaleF32SrPkFp4F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  odsState.addTypes(res);
}

CvtScaleF32SrPkFp4F32Op CvtScaleF32SrPkFp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4F32Op CvtScaleF32SrPkFp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src, seed, scale, dstSelIndex);
}

void CvtScaleF32SrPkFp4F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = dstSelIndex;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPkFp4F32Op CvtScaleF32SrPkFp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4F32Op CvtScaleF32SrPkFp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, ::mlir::IntegerAttr dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src, seed, scale, dstSelIndex);
}

void CvtScaleF32SrPkFp4F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  odsState.addTypes(res);
}

CvtScaleF32SrPkFp4F32Op CvtScaleF32SrPkFp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, oldVdst, src, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4F32Op CvtScaleF32SrPkFp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), res, oldVdst, src, seed, scale, dstSelIndex);
}

void CvtScaleF32SrPkFp4F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  odsState.addOperands(oldVdst);
  odsState.addOperands(src);
  odsState.addOperands(seed);
  odsState.addOperands(scale);
  odsState.getOrAddProperties<Properties>().dstSelIndex = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dstSelIndex);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPkFp4F32Op CvtScaleF32SrPkFp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, oldVdst, src, seed, scale, dstSelIndex);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4F32Op CvtScaleF32SrPkFp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value oldVdst, ::mlir::Value src, ::mlir::Value seed, ::mlir::Value scale, uint32_t dstSelIndex) {
  return create(builder, builder.getLoc(), resultTypes, oldVdst, src, seed, scale, dstSelIndex);
}

void CvtScaleF32SrPkFp4F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtScaleF32SrPkFp4F32Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtScaleF32SrPkFp4F32Op CvtScaleF32SrPkFp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4F32Op CvtScaleF32SrPkFp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtScaleF32SrPkFp4F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtScaleF32SrPkFp4F32Op CvtScaleF32SrPkFp4F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtScaleF32SrPkFp4F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtScaleF32SrPkFp4F32Op CvtScaleF32SrPkFp4F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtScaleF32SrPkFp4F32Op::verifyInvariantsImpl() {
  auto tblgen_dstSelIndex = getProperties().dstSelIndex; (void)tblgen_dstSelIndex;
  if (!tblgen_dstSelIndex) return emitOpError("requires attribute 'dstSelIndex'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_dstSelIndex, "dstSelIndex")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps21(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtScaleF32SrPkFp4F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtScaleF32SrPkFp4F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand seedRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> seedOperands(&seedRawOperand, 1);  ::llvm::SMLoc seedOperandsLoc;
  (void)seedOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleOperands(&scaleRawOperand, 1);  ::llvm::SMLoc scaleOperandsLoc;
  (void)scaleOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldVdstRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldVdstOperands(&oldVdstRawOperand, 1);  ::llvm::SMLoc oldVdstOperandsLoc;
  (void)oldVdstOperandsLoc;
  ::mlir::IntegerAttr dstSelIndexAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  seedOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(seedRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldVdstOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldVdstRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dstSelIndexAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (dstSelIndexAttr) result.getOrAddProperties<CvtScaleF32SrPkFp4F32Op::Properties>().dstSelIndex = dstSelIndexAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  ::mlir::Type odsBuildableType1 = ::mlir::VectorType::get({2} ,parser.getBuilder().getF32Type());
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getF32Type();
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldVdstOperands, odsBuildableType0, oldVdstOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcOperands, odsBuildableType1, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(seedOperands, odsBuildableType0, seedOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(scaleOperands, odsBuildableType2, scaleOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtScaleF32SrPkFp4F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dstSelIndex");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSeed();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScale();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOldVdst();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getDstSelIndexAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtScaleF32SrPkFp4F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtScaleF32SrPkFp4F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtSrBf8F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtSrBf8F32OpGenericAdaptorBase::CvtSrBf8F32OpGenericAdaptorBase(CvtSrBf8F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtSrBf8F32OpGenericAdaptorBase::getByteSel() {
  auto attr = getByteSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtSrBf8F32OpAdaptor::CvtSrBf8F32OpAdaptor(CvtSrBf8F32Op op) : CvtSrBf8F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtSrBf8F32OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_byteSel = getProperties().byteSel; (void)tblgen_byteSel;
  if (!tblgen_byteSel) return emitError(loc, "'rocdl.cvt.sr.bf8.f32' op requires attribute 'byteSel'");

  if (tblgen_byteSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_byteSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_byteSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.sr.bf8.f32' op attribute 'byteSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtSrBf8F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.byteSel;
       auto attr = dict.get("byteSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `byteSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtSrBf8F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.byteSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("byteSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtSrBf8F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.byteSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtSrBf8F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "byteSel")
      return prop.byteSel;
  return std::nullopt;
}

void CvtSrBf8F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "byteSel") {
       prop.byteSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.byteSel)>>(value);
       return;
    }
}

void CvtSrBf8F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.byteSel) attrs.append("byteSel", prop.byteSel);
}

::llvm::LogicalResult CvtSrBf8F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getByteSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "byteSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtSrBf8F32Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.byteSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtSrBf8F32Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.byteSel);
}

uint32_t CvtSrBf8F32Op::getByteSel() {
  auto attr = getByteSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtSrBf8F32Op::setByteSel(uint32_t attrValue) {
  getProperties().byteSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtSrBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr byteSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().byteSel = byteSel;
  odsState.addTypes(res);
}

CvtSrBf8F32Op CvtSrBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, srcA, srcB, old, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtSrBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtSrBf8F32Op CvtSrBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr byteSel) {
  return create(builder, builder.getLoc(), res, srcA, srcB, old, byteSel);
}

void CvtSrBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr byteSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().byteSel = byteSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtSrBf8F32Op CvtSrBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, srcA, srcB, old, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtSrBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtSrBf8F32Op CvtSrBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr byteSel) {
  return create(builder, builder.getLoc(), resultTypes, srcA, srcB, old, byteSel);
}

void CvtSrBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, uint32_t byteSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().byteSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), byteSel);
  odsState.addTypes(res);
}

CvtSrBf8F32Op CvtSrBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, uint32_t byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, srcA, srcB, old, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtSrBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtSrBf8F32Op CvtSrBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, uint32_t byteSel) {
  return create(builder, builder.getLoc(), res, srcA, srcB, old, byteSel);
}

void CvtSrBf8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, uint32_t byteSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().byteSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), byteSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtSrBf8F32Op CvtSrBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, uint32_t byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, srcA, srcB, old, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtSrBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtSrBf8F32Op CvtSrBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, uint32_t byteSel) {
  return create(builder, builder.getLoc(), resultTypes, srcA, srcB, old, byteSel);
}

void CvtSrBf8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtSrBf8F32Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtSrBf8F32Op CvtSrBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtSrBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtSrBf8F32Op CvtSrBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtSrBf8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtSrBf8F32Op CvtSrBf8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtSrBf8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtSrBf8F32Op CvtSrBf8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtSrBf8F32Op::verifyInvariantsImpl() {
  auto tblgen_byteSel = getProperties().byteSel; (void)tblgen_byteSel;
  if (!tblgen_byteSel) return emitOpError("requires attribute 'byteSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_byteSel, "byteSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtSrBf8F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtSrBf8F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcARawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcAOperands(&srcARawOperand, 1);  ::llvm::SMLoc srcAOperandsLoc;
  (void)srcAOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand srcBRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcBOperands(&srcBRawOperand, 1);  ::llvm::SMLoc srcBOperandsLoc;
  (void)srcBOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldOperands(&oldRawOperand, 1);  ::llvm::SMLoc oldOperandsLoc;
  (void)oldOperandsLoc;
  ::mlir::IntegerAttr byteSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcAOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcARawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  srcBOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcBRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(byteSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (byteSelAttr) result.getOrAddProperties<CvtSrBf8F32Op::Properties>().byteSel = byteSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getF32Type();
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcAOperands, odsBuildableType0, srcAOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcBOperands, odsBuildableType1, srcBOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(oldOperands, odsBuildableType1, oldOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtSrBf8F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("byteSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrcA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrcB();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOld();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getByteSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtSrBf8F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtSrBf8F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::CvtSrFp8F32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

CvtSrFp8F32OpGenericAdaptorBase::CvtSrFp8F32OpGenericAdaptorBase(CvtSrFp8F32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t CvtSrFp8F32OpGenericAdaptorBase::getByteSel() {
  auto attr = getByteSelAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
CvtSrFp8F32OpAdaptor::CvtSrFp8F32OpAdaptor(CvtSrFp8F32Op op) : CvtSrFp8F32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult CvtSrFp8F32OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_byteSel = getProperties().byteSel; (void)tblgen_byteSel;
  if (!tblgen_byteSel) return emitError(loc, "'rocdl.cvt.sr.fp8.f32' op requires attribute 'byteSel'");

  if (tblgen_byteSel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_byteSel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_byteSel).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.cvt.sr.fp8.f32' op attribute 'byteSel' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult CvtSrFp8F32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.byteSel;
       auto attr = dict.get("byteSel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `byteSel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute CvtSrFp8F32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.byteSel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("byteSel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code CvtSrFp8F32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.byteSel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> CvtSrFp8F32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "byteSel")
      return prop.byteSel;
  return std::nullopt;
}

void CvtSrFp8F32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "byteSel") {
       prop.byteSel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.byteSel)>>(value);
       return;
    }
}

void CvtSrFp8F32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.byteSel) attrs.append("byteSel", prop.byteSel);
}

::llvm::LogicalResult CvtSrFp8F32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getByteSelAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "byteSel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult CvtSrFp8F32Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.byteSel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtSrFp8F32Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.byteSel);
}

uint32_t CvtSrFp8F32Op::getByteSel() {
  auto attr = getByteSelAttr();
  return attr.getValue().getZExtValue();
}

void CvtSrFp8F32Op::setByteSel(uint32_t attrValue) {
  getProperties().byteSel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void CvtSrFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr byteSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().byteSel = byteSel;
  odsState.addTypes(res);
}

CvtSrFp8F32Op CvtSrFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, srcA, srcB, old, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtSrFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtSrFp8F32Op CvtSrFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr byteSel) {
  return create(builder, builder.getLoc(), res, srcA, srcB, old, byteSel);
}

void CvtSrFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr byteSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().byteSel = byteSel;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtSrFp8F32Op CvtSrFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, srcA, srcB, old, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtSrFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtSrFp8F32Op CvtSrFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, ::mlir::IntegerAttr byteSel) {
  return create(builder, builder.getLoc(), resultTypes, srcA, srcB, old, byteSel);
}

void CvtSrFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, uint32_t byteSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().byteSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), byteSel);
  odsState.addTypes(res);
}

CvtSrFp8F32Op CvtSrFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, uint32_t byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, srcA, srcB, old, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtSrFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtSrFp8F32Op CvtSrFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, uint32_t byteSel) {
  return create(builder, builder.getLoc(), res, srcA, srcB, old, byteSel);
}

void CvtSrFp8F32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, uint32_t byteSel) {
  odsState.addOperands(srcA);
  odsState.addOperands(srcB);
  odsState.addOperands(old);
  odsState.getOrAddProperties<Properties>().byteSel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), byteSel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

CvtSrFp8F32Op CvtSrFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, uint32_t byteSel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, srcA, srcB, old, byteSel);
  auto __res__ = ::llvm::dyn_cast<CvtSrFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtSrFp8F32Op CvtSrFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcA, ::mlir::Value srcB, ::mlir::Value old, uint32_t byteSel) {
  return create(builder, builder.getLoc(), resultTypes, srcA, srcB, old, byteSel);
}

void CvtSrFp8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<CvtSrFp8F32Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

CvtSrFp8F32Op CvtSrFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<CvtSrFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtSrFp8F32Op CvtSrFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void CvtSrFp8F32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

CvtSrFp8F32Op CvtSrFp8F32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<CvtSrFp8F32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

CvtSrFp8F32Op CvtSrFp8F32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult CvtSrFp8F32Op::verifyInvariantsImpl() {
  auto tblgen_byteSel = getProperties().byteSel; (void)tblgen_byteSel;
  if (!tblgen_byteSel) return emitOpError("requires attribute 'byteSel'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_byteSel, "byteSel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps5(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult CvtSrFp8F32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult CvtSrFp8F32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcARawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcAOperands(&srcARawOperand, 1);  ::llvm::SMLoc srcAOperandsLoc;
  (void)srcAOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand srcBRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcBOperands(&srcBRawOperand, 1);  ::llvm::SMLoc srcBOperandsLoc;
  (void)srcBOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand oldRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldOperands(&oldRawOperand, 1);  ::llvm::SMLoc oldOperandsLoc;
  (void)oldOperandsLoc;
  ::mlir::IntegerAttr byteSelAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  srcAOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcARawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  srcBOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcBRawOperand))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  oldOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldRawOperand))
    return ::mlir::failure();
  if (parser.parseLSquare())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(byteSelAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (byteSelAttr) result.getOrAddProperties<CvtSrFp8F32Op::Properties>().byteSel = byteSelAttr;
  if (parser.parseRSquare())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getF32Type();
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcAOperands, odsBuildableType0, srcAOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcBOperands, odsBuildableType1, srcBOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(oldOperands, odsBuildableType1, oldOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void CvtSrFp8F32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("byteSel");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getSrcA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrcB();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  _odsPrinter << getOld();
  _odsPrinter << "[";
  _odsPrinter.printAttributeWithoutType(getByteSelAttr());
  _odsPrinter << "]";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void CvtSrFp8F32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::CvtSrFp8F32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::DPPUpdateOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

DPPUpdateOpGenericAdaptorBase::DPPUpdateOpGenericAdaptorBase(DPPUpdateOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t DPPUpdateOpGenericAdaptorBase::getDppCtrl() {
  auto attr = getDppCtrlAttr();
  return attr.getValue().getZExtValue();
}

uint32_t DPPUpdateOpGenericAdaptorBase::getRowMask() {
  auto attr = getRowMaskAttr();
  return attr.getValue().getZExtValue();
}

uint32_t DPPUpdateOpGenericAdaptorBase::getBankMask() {
  auto attr = getBankMaskAttr();
  return attr.getValue().getZExtValue();
}

bool DPPUpdateOpGenericAdaptorBase::getBoundCtrl() {
  auto attr = getBoundCtrlAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
DPPUpdateOpAdaptor::DPPUpdateOpAdaptor(DPPUpdateOp op) : DPPUpdateOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult DPPUpdateOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_bankMask = getProperties().bankMask; (void)tblgen_bankMask;
  if (!tblgen_bankMask) return emitError(loc, "'rocdl.update.dpp' op requires attribute 'bankMask'");
  auto tblgen_boundCtrl = getProperties().boundCtrl; (void)tblgen_boundCtrl;
  if (!tblgen_boundCtrl) return emitError(loc, "'rocdl.update.dpp' op requires attribute 'boundCtrl'");
  auto tblgen_dppCtrl = getProperties().dppCtrl; (void)tblgen_dppCtrl;
  if (!tblgen_dppCtrl) return emitError(loc, "'rocdl.update.dpp' op requires attribute 'dppCtrl'");
  auto tblgen_rowMask = getProperties().rowMask; (void)tblgen_rowMask;
  if (!tblgen_rowMask) return emitError(loc, "'rocdl.update.dpp' op requires attribute 'rowMask'");

  if (tblgen_dppCtrl && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_dppCtrl))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_dppCtrl).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.update.dpp' op attribute 'dppCtrl' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_rowMask && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_rowMask))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_rowMask).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.update.dpp' op attribute 'rowMask' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_bankMask && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_bankMask))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_bankMask).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.update.dpp' op attribute 'bankMask' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_boundCtrl && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_boundCtrl))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_boundCtrl).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.update.dpp' op attribute 'boundCtrl' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult DPPUpdateOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.bankMask;
       auto attr = dict.get("bankMask");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `bankMask` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.boundCtrl;
       auto attr = dict.get("boundCtrl");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `boundCtrl` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.dppCtrl;
       auto attr = dict.get("dppCtrl");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `dppCtrl` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.rowMask;
       auto attr = dict.get("rowMask");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `rowMask` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute DPPUpdateOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.bankMask;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("bankMask",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.boundCtrl;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("boundCtrl",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.dppCtrl;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("dppCtrl",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.rowMask;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("rowMask",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code DPPUpdateOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.bankMask.getAsOpaquePointer()), 
    llvm::hash_value(prop.boundCtrl.getAsOpaquePointer()), 
    llvm::hash_value(prop.dppCtrl.getAsOpaquePointer()), 
    llvm::hash_value(prop.rowMask.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> DPPUpdateOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "bankMask")
      return prop.bankMask;

    if (name == "boundCtrl")
      return prop.boundCtrl;

    if (name == "dppCtrl")
      return prop.dppCtrl;

    if (name == "rowMask")
      return prop.rowMask;
  return std::nullopt;
}

void DPPUpdateOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "bankMask") {
       prop.bankMask = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.bankMask)>>(value);
       return;
    }

    if (name == "boundCtrl") {
       prop.boundCtrl = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.boundCtrl)>>(value);
       return;
    }

    if (name == "dppCtrl") {
       prop.dppCtrl = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.dppCtrl)>>(value);
       return;
    }

    if (name == "rowMask") {
       prop.rowMask = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.rowMask)>>(value);
       return;
    }
}

void DPPUpdateOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.bankMask) attrs.append("bankMask", prop.bankMask);

    if (prop.boundCtrl) attrs.append("boundCtrl", prop.boundCtrl);

    if (prop.dppCtrl) attrs.append("dppCtrl", prop.dppCtrl);

    if (prop.rowMask) attrs.append("rowMask", prop.rowMask);
}

::llvm::LogicalResult DPPUpdateOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getBankMaskAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "bankMask", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getBoundCtrlAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "boundCtrl", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getDppCtrlAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "dppCtrl", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getRowMaskAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "rowMask", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult DPPUpdateOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.bankMask)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.boundCtrl)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.dppCtrl)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.rowMask)))
    return ::mlir::failure();
  return ::mlir::success();
}

void DPPUpdateOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.bankMask);
  writer.writeAttribute(prop.boundCtrl);
  writer.writeAttribute(prop.dppCtrl);
  writer.writeAttribute(prop.rowMask);
}

uint32_t DPPUpdateOp::getDppCtrl() {
  auto attr = getDppCtrlAttr();
  return attr.getValue().getZExtValue();
}

uint32_t DPPUpdateOp::getRowMask() {
  auto attr = getRowMaskAttr();
  return attr.getValue().getZExtValue();
}

uint32_t DPPUpdateOp::getBankMask() {
  auto attr = getBankMaskAttr();
  return attr.getValue().getZExtValue();
}

bool DPPUpdateOp::getBoundCtrl() {
  auto attr = getBoundCtrlAttr();
  return attr.getValue().getZExtValue();
}

void DPPUpdateOp::setDppCtrl(uint32_t attrValue) {
  getProperties().dppCtrl = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void DPPUpdateOp::setRowMask(uint32_t attrValue) {
  getProperties().rowMask = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void DPPUpdateOp::setBankMask(uint32_t attrValue) {
  getProperties().bankMask = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void DPPUpdateOp::setBoundCtrl(bool attrValue) {
  getProperties().boundCtrl = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void DPPUpdateOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr dppCtrl, ::mlir::IntegerAttr rowMask, ::mlir::IntegerAttr bankMask, ::mlir::IntegerAttr boundCtrl) {
  odsState.addOperands(old);
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().dppCtrl = dppCtrl;
  odsState.getOrAddProperties<Properties>().rowMask = rowMask;
  odsState.getOrAddProperties<Properties>().bankMask = bankMask;
  odsState.getOrAddProperties<Properties>().boundCtrl = boundCtrl;
  odsState.addTypes(res);
}

DPPUpdateOp DPPUpdateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr dppCtrl, ::mlir::IntegerAttr rowMask, ::mlir::IntegerAttr bankMask, ::mlir::IntegerAttr boundCtrl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, old, src, dppCtrl, rowMask, bankMask, boundCtrl);
  auto __res__ = ::llvm::dyn_cast<DPPUpdateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DPPUpdateOp DPPUpdateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr dppCtrl, ::mlir::IntegerAttr rowMask, ::mlir::IntegerAttr bankMask, ::mlir::IntegerAttr boundCtrl) {
  return create(builder, builder.getLoc(), res, old, src, dppCtrl, rowMask, bankMask, boundCtrl);
}

void DPPUpdateOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr dppCtrl, ::mlir::IntegerAttr rowMask, ::mlir::IntegerAttr bankMask, ::mlir::IntegerAttr boundCtrl) {
  odsState.addOperands(old);
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().dppCtrl = dppCtrl;
  odsState.getOrAddProperties<Properties>().rowMask = rowMask;
  odsState.getOrAddProperties<Properties>().bankMask = bankMask;
  odsState.getOrAddProperties<Properties>().boundCtrl = boundCtrl;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

DPPUpdateOp DPPUpdateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr dppCtrl, ::mlir::IntegerAttr rowMask, ::mlir::IntegerAttr bankMask, ::mlir::IntegerAttr boundCtrl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, old, src, dppCtrl, rowMask, bankMask, boundCtrl);
  auto __res__ = ::llvm::dyn_cast<DPPUpdateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DPPUpdateOp DPPUpdateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr dppCtrl, ::mlir::IntegerAttr rowMask, ::mlir::IntegerAttr bankMask, ::mlir::IntegerAttr boundCtrl) {
  return create(builder, builder.getLoc(), resultTypes, old, src, dppCtrl, rowMask, bankMask, boundCtrl);
}

void DPPUpdateOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, uint32_t dppCtrl, uint32_t rowMask, uint32_t bankMask, bool boundCtrl) {
  odsState.addOperands(old);
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().dppCtrl = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dppCtrl);
  odsState.getOrAddProperties<Properties>().rowMask = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), rowMask);
  odsState.getOrAddProperties<Properties>().bankMask = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), bankMask);
  odsState.getOrAddProperties<Properties>().boundCtrl = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), boundCtrl);
  odsState.addTypes(res);
}

DPPUpdateOp DPPUpdateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, uint32_t dppCtrl, uint32_t rowMask, uint32_t bankMask, bool boundCtrl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, old, src, dppCtrl, rowMask, bankMask, boundCtrl);
  auto __res__ = ::llvm::dyn_cast<DPPUpdateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DPPUpdateOp DPPUpdateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, uint32_t dppCtrl, uint32_t rowMask, uint32_t bankMask, bool boundCtrl) {
  return create(builder, builder.getLoc(), res, old, src, dppCtrl, rowMask, bankMask, boundCtrl);
}

void DPPUpdateOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, uint32_t dppCtrl, uint32_t rowMask, uint32_t bankMask, bool boundCtrl) {
  odsState.addOperands(old);
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().dppCtrl = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), dppCtrl);
  odsState.getOrAddProperties<Properties>().rowMask = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), rowMask);
  odsState.getOrAddProperties<Properties>().bankMask = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), bankMask);
  odsState.getOrAddProperties<Properties>().boundCtrl = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), boundCtrl);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

DPPUpdateOp DPPUpdateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, uint32_t dppCtrl, uint32_t rowMask, uint32_t bankMask, bool boundCtrl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, old, src, dppCtrl, rowMask, bankMask, boundCtrl);
  auto __res__ = ::llvm::dyn_cast<DPPUpdateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DPPUpdateOp DPPUpdateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, uint32_t dppCtrl, uint32_t rowMask, uint32_t bankMask, bool boundCtrl) {
  return create(builder, builder.getLoc(), resultTypes, old, src, dppCtrl, rowMask, bankMask, boundCtrl);
}

void DPPUpdateOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<DPPUpdateOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

DPPUpdateOp DPPUpdateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<DPPUpdateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DPPUpdateOp DPPUpdateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void DPPUpdateOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

DPPUpdateOp DPPUpdateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<DPPUpdateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DPPUpdateOp DPPUpdateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult DPPUpdateOp::verifyInvariantsImpl() {
  auto tblgen_bankMask = getProperties().bankMask; (void)tblgen_bankMask;
  if (!tblgen_bankMask) return emitOpError("requires attribute 'bankMask'");
  auto tblgen_boundCtrl = getProperties().boundCtrl; (void)tblgen_boundCtrl;
  if (!tblgen_boundCtrl) return emitOpError("requires attribute 'boundCtrl'");
  auto tblgen_dppCtrl = getProperties().dppCtrl; (void)tblgen_dppCtrl;
  if (!tblgen_dppCtrl) return emitOpError("requires attribute 'dppCtrl'");
  auto tblgen_rowMask = getProperties().rowMask; (void)tblgen_rowMask;
  if (!tblgen_rowMask) return emitOpError("requires attribute 'rowMask'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_dppCtrl, "dppCtrl")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_rowMask, "rowMask")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_bankMask, "bankMask")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_boundCtrl, "boundCtrl")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  if (!((((*this->getODSResults(0).begin()).getType()) == ((*this->getODSOperands(1).begin()).getType()) && ((*this->getODSOperands(1).begin()).getType()) == ((*this->getODSOperands(0).begin()).getType()) && ((*this->getODSOperands(0).begin()).getType()) == ((*this->getODSResults(0).begin()).getType()))))
    return emitOpError("failed to verify that all of {res, src, old} have same type");
  return ::mlir::success();
}

::llvm::LogicalResult DPPUpdateOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult DPPUpdateOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand oldRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldOperands(&oldRawOperand, 1);  ::llvm::SMLoc oldOperandsLoc;
  (void)oldOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr dppCtrlAttr;
  ::mlir::IntegerAttr rowMaskAttr;
  ::mlir::IntegerAttr bankMaskAttr;
  ::mlir::IntegerAttr boundCtrlAttr;
  ::mlir::Type srcRawType{};
  ::llvm::ArrayRef<::mlir::Type> srcTypes(&srcRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  oldOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseKeyword("with"))
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(dppCtrlAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (dppCtrlAttr) result.getOrAddProperties<DPPUpdateOp::Properties>().dppCtrl = dppCtrlAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(rowMaskAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (rowMaskAttr) result.getOrAddProperties<DPPUpdateOp::Properties>().rowMask = rowMaskAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(bankMaskAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (bankMaskAttr) result.getOrAddProperties<DPPUpdateOp::Properties>().bankMask = bankMaskAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(boundCtrlAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (boundCtrlAttr) result.getOrAddProperties<DPPUpdateOp::Properties>().boundCtrl = boundCtrlAttr;
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    srcRawType = type;
  }
  result.addTypes(srcTypes[0]);
  if (parser.resolveOperands(oldOperands, srcTypes[0], oldOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcOperands, srcTypes, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void DPPUpdateOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("dppCtrl");
  elidedAttrs.push_back("rowMask");
  elidedAttrs.push_back("bankMask");
  elidedAttrs.push_back("boundCtrl");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getOld();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ' ' << "with";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getDppCtrlAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getRowMaskAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getBankMaskAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getBoundCtrlAttr());
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getSrc().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::DPPUpdateOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::DsBpermuteOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

DsBpermuteOpGenericAdaptorBase::DsBpermuteOpGenericAdaptorBase(DsBpermuteOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
DsBpermuteOpAdaptor::DsBpermuteOpAdaptor(DsBpermuteOp op) : DsBpermuteOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult DsBpermuteOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult DsBpermuteOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute DsBpermuteOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code DsBpermuteOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> DsBpermuteOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void DsBpermuteOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void DsBpermuteOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult DsBpermuteOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void DsBpermuteOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value index, ::mlir::Value src) {
  odsState.addOperands(index);
  odsState.addOperands(src);
  odsState.addTypes(res);
}

DsBpermuteOp DsBpermuteOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value index, ::mlir::Value src) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, index, src);
  auto __res__ = ::llvm::dyn_cast<DsBpermuteOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsBpermuteOp DsBpermuteOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value index, ::mlir::Value src) {
  return create(builder, builder.getLoc(), res, index, src);
}

void DsBpermuteOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value index, ::mlir::Value src) {
  odsState.addOperands(index);
  odsState.addOperands(src);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

DsBpermuteOp DsBpermuteOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value index, ::mlir::Value src) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, index, src);
  auto __res__ = ::llvm::dyn_cast<DsBpermuteOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsBpermuteOp DsBpermuteOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value index, ::mlir::Value src) {
  return create(builder, builder.getLoc(), resultTypes, index, src);
}

void DsBpermuteOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

DsBpermuteOp DsBpermuteOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<DsBpermuteOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsBpermuteOp DsBpermuteOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void DsBpermuteOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

DsBpermuteOp DsBpermuteOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<DsBpermuteOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsBpermuteOp DsBpermuteOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult DsBpermuteOp::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult DsBpermuteOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult DsBpermuteOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand indexRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> indexOperands(&indexRawOperand, 1);  ::llvm::SMLoc indexOperandsLoc;
  (void)indexOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::Type indexRawType{};
  ::llvm::ArrayRef<::mlir::Type> indexTypes(&indexRawType, 1);
  ::mlir::Type srcRawType{};
  ::llvm::ArrayRef<::mlir::Type> srcTypes(&srcRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  indexOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(indexRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();
  if (parser.parseLParen())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    indexRawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    srcRawType = type;
  }
  if (parser.parseRParen())
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(indexOperands, indexTypes, indexOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcOperands, srcTypes, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void DsBpermuteOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getIndex();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ' << "(";
  {
    auto type = getIndex().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getSrc().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ")";
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::DsBpermuteOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::DsLoadTr16_B128 definitions
//===----------------------------------------------------------------------===//

namespace detail {

DsLoadTr16_B128GenericAdaptorBase::DsLoadTr16_B128GenericAdaptorBase(DsLoadTr16_B128 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > DsLoadTr16_B128GenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr16_B128GenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr16_B128GenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
DsLoadTr16_B128Adaptor::DsLoadTr16_B128Adaptor(DsLoadTr16_B128 op) : DsLoadTr16_B128GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult DsLoadTr16_B128Adaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.load.tr16.b128' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.load.tr16.b128' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.load.tr16.b128' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult DsLoadTr16_B128::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute DsLoadTr16_B128::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code DsLoadTr16_B128::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> DsLoadTr16_B128::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void DsLoadTr16_B128::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void DsLoadTr16_B128::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult DsLoadTr16_B128::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult DsLoadTr16_B128::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void DsLoadTr16_B128::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr16_B128::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr16_B128::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr16_B128::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void DsLoadTr16_B128::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  odsState.addTypes(res);
}

DsLoadTr16_B128 DsLoadTr16_B128::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr16_B128>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr16_B128 DsLoadTr16_B128::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), res, ptr, alias_scopes, noalias_scopes, tbaa);
}

void DsLoadTr16_B128::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

DsLoadTr16_B128 DsLoadTr16_B128::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr16_B128>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr16_B128 DsLoadTr16_B128::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
}

void DsLoadTr16_B128::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<DsLoadTr16_B128::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

DsLoadTr16_B128 DsLoadTr16_B128::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr16_B128>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr16_B128 DsLoadTr16_B128::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void DsLoadTr16_B128::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

DsLoadTr16_B128 DsLoadTr16_B128::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr16_B128>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr16_B128 DsLoadTr16_B128::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult DsLoadTr16_B128::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult DsLoadTr16_B128::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult DsLoadTr16_B128::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::Type ptrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ptrTypes(&ptrRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  if (parser.parseType(ptrRawType))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(ptrOperands, ptrTypes, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void DsLoadTr16_B128::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
   _odsPrinter << getPtr().getType();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void DsLoadTr16_B128::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> DsLoadTr16_B128::getAccessedOperands() {
  return {getPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::DsLoadTr16_B128)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::DsLoadTr4_B64 definitions
//===----------------------------------------------------------------------===//

namespace detail {

DsLoadTr4_B64GenericAdaptorBase::DsLoadTr4_B64GenericAdaptorBase(DsLoadTr4_B64 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > DsLoadTr4_B64GenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr4_B64GenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr4_B64GenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
DsLoadTr4_B64Adaptor::DsLoadTr4_B64Adaptor(DsLoadTr4_B64 op) : DsLoadTr4_B64GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult DsLoadTr4_B64Adaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.load.tr4.b64' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.load.tr4.b64' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.load.tr4.b64' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult DsLoadTr4_B64::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute DsLoadTr4_B64::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code DsLoadTr4_B64::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> DsLoadTr4_B64::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void DsLoadTr4_B64::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void DsLoadTr4_B64::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult DsLoadTr4_B64::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult DsLoadTr4_B64::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void DsLoadTr4_B64::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr4_B64::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr4_B64::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr4_B64::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void DsLoadTr4_B64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  odsState.addTypes(res);
}

DsLoadTr4_B64 DsLoadTr4_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr4_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr4_B64 DsLoadTr4_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), res, ptr, alias_scopes, noalias_scopes, tbaa);
}

void DsLoadTr4_B64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

DsLoadTr4_B64 DsLoadTr4_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr4_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr4_B64 DsLoadTr4_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
}

void DsLoadTr4_B64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<DsLoadTr4_B64::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

DsLoadTr4_B64 DsLoadTr4_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr4_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr4_B64 DsLoadTr4_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void DsLoadTr4_B64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

DsLoadTr4_B64 DsLoadTr4_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr4_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr4_B64 DsLoadTr4_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult DsLoadTr4_B64::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult DsLoadTr4_B64::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult DsLoadTr4_B64::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::Type ptrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ptrTypes(&ptrRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  if (parser.parseType(ptrRawType))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(ptrOperands, ptrTypes, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void DsLoadTr4_B64::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
   _odsPrinter << getPtr().getType();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void DsLoadTr4_B64::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> DsLoadTr4_B64::getAccessedOperands() {
  return {getPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::DsLoadTr4_B64)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::DsLoadTr6_B96 definitions
//===----------------------------------------------------------------------===//

namespace detail {

DsLoadTr6_B96GenericAdaptorBase::DsLoadTr6_B96GenericAdaptorBase(DsLoadTr6_B96 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > DsLoadTr6_B96GenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr6_B96GenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr6_B96GenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
DsLoadTr6_B96Adaptor::DsLoadTr6_B96Adaptor(DsLoadTr6_B96 op) : DsLoadTr6_B96GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult DsLoadTr6_B96Adaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.load.tr6.b96' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.load.tr6.b96' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.load.tr6.b96' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult DsLoadTr6_B96::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute DsLoadTr6_B96::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code DsLoadTr6_B96::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> DsLoadTr6_B96::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void DsLoadTr6_B96::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void DsLoadTr6_B96::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult DsLoadTr6_B96::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult DsLoadTr6_B96::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void DsLoadTr6_B96::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr6_B96::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr6_B96::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr6_B96::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void DsLoadTr6_B96::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  odsState.addTypes(res);
}

DsLoadTr6_B96 DsLoadTr6_B96::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr6_B96>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr6_B96 DsLoadTr6_B96::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), res, ptr, alias_scopes, noalias_scopes, tbaa);
}

void DsLoadTr6_B96::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

DsLoadTr6_B96 DsLoadTr6_B96::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr6_B96>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr6_B96 DsLoadTr6_B96::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
}

void DsLoadTr6_B96::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<DsLoadTr6_B96::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

DsLoadTr6_B96 DsLoadTr6_B96::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr6_B96>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr6_B96 DsLoadTr6_B96::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void DsLoadTr6_B96::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

DsLoadTr6_B96 DsLoadTr6_B96::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr6_B96>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr6_B96 DsLoadTr6_B96::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult DsLoadTr6_B96::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult DsLoadTr6_B96::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult DsLoadTr6_B96::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::Type ptrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ptrTypes(&ptrRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  if (parser.parseType(ptrRawType))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(ptrOperands, ptrTypes, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void DsLoadTr6_B96::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
   _odsPrinter << getPtr().getType();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void DsLoadTr6_B96::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> DsLoadTr6_B96::getAccessedOperands() {
  return {getPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::DsLoadTr6_B96)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::DsLoadTr8_B64 definitions
//===----------------------------------------------------------------------===//

namespace detail {

DsLoadTr8_B64GenericAdaptorBase::DsLoadTr8_B64GenericAdaptorBase(DsLoadTr8_B64 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > DsLoadTr8_B64GenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr8_B64GenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr8_B64GenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
DsLoadTr8_B64Adaptor::DsLoadTr8_B64Adaptor(DsLoadTr8_B64 op) : DsLoadTr8_B64GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult DsLoadTr8_B64Adaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.load.tr8.b64' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.load.tr8.b64' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.load.tr8.b64' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult DsLoadTr8_B64::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute DsLoadTr8_B64::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code DsLoadTr8_B64::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> DsLoadTr8_B64::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void DsLoadTr8_B64::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void DsLoadTr8_B64::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult DsLoadTr8_B64::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult DsLoadTr8_B64::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void DsLoadTr8_B64::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr8_B64::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr8_B64::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > DsLoadTr8_B64::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void DsLoadTr8_B64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  odsState.addTypes(res);
}

DsLoadTr8_B64 DsLoadTr8_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr8_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr8_B64 DsLoadTr8_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), res, ptr, alias_scopes, noalias_scopes, tbaa);
}

void DsLoadTr8_B64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

DsLoadTr8_B64 DsLoadTr8_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr8_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr8_B64 DsLoadTr8_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
}

void DsLoadTr8_B64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<DsLoadTr8_B64::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

DsLoadTr8_B64 DsLoadTr8_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr8_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr8_B64 DsLoadTr8_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void DsLoadTr8_B64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

DsLoadTr8_B64 DsLoadTr8_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<DsLoadTr8_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsLoadTr8_B64 DsLoadTr8_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult DsLoadTr8_B64::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult DsLoadTr8_B64::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult DsLoadTr8_B64::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::Type ptrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ptrTypes(&ptrRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  if (parser.parseType(ptrRawType))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(ptrOperands, ptrTypes, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void DsLoadTr8_B64::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
   _odsPrinter << getPtr().getType();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void DsLoadTr8_B64::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> DsLoadTr8_B64::getAccessedOperands() {
  return {getPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::DsLoadTr8_B64)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::DsSwizzleOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

DsSwizzleOpGenericAdaptorBase::DsSwizzleOpGenericAdaptorBase(DsSwizzleOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
DsSwizzleOpAdaptor::DsSwizzleOpAdaptor(DsSwizzleOp op) : DsSwizzleOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult DsSwizzleOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult DsSwizzleOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute DsSwizzleOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code DsSwizzleOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> DsSwizzleOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void DsSwizzleOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void DsSwizzleOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult DsSwizzleOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void DsSwizzleOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value offset) {
  odsState.addOperands(src);
  odsState.addOperands(offset);
  odsState.addTypes(res);
}

DsSwizzleOp DsSwizzleOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value offset) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, offset);
  auto __res__ = ::llvm::dyn_cast<DsSwizzleOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsSwizzleOp DsSwizzleOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value offset) {
  return create(builder, builder.getLoc(), res, src, offset);
}

void DsSwizzleOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value offset) {
  odsState.addOperands(src);
  odsState.addOperands(offset);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

DsSwizzleOp DsSwizzleOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value offset) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, offset);
  auto __res__ = ::llvm::dyn_cast<DsSwizzleOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsSwizzleOp DsSwizzleOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value offset) {
  return create(builder, builder.getLoc(), resultTypes, src, offset);
}

void DsSwizzleOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

DsSwizzleOp DsSwizzleOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<DsSwizzleOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsSwizzleOp DsSwizzleOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void DsSwizzleOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

DsSwizzleOp DsSwizzleOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<DsSwizzleOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

DsSwizzleOp DsSwizzleOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult DsSwizzleOp::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult DsSwizzleOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult DsSwizzleOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand offsetRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> offsetOperands(&offsetRawOperand, 1);  ::llvm::SMLoc offsetOperandsLoc;
  (void)offsetOperandsLoc;
  ::mlir::Type srcRawType{};
  ::llvm::ArrayRef<::mlir::Type> srcTypes(&srcRawType, 1);
  ::mlir::Type offsetRawType{};
  ::llvm::ArrayRef<::mlir::Type> offsetTypes(&offsetRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  offsetOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(offsetRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();
  if (parser.parseLParen())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    srcRawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    offsetRawType = type;
  }
  if (parser.parseRParen())
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, srcTypes, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(offsetOperands, offsetTypes, offsetOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void DsSwizzleOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getOffset();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ' << "(";
  {
    auto type = getSrc().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getOffset().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ")";
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::DsSwizzleOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::FMed3Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

FMed3OpGenericAdaptorBase::FMed3OpGenericAdaptorBase(FMed3Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
FMed3OpAdaptor::FMed3OpAdaptor(FMed3Op op) : FMed3OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult FMed3OpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult FMed3Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute FMed3Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code FMed3Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> FMed3Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void FMed3Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void FMed3Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult FMed3Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void FMed3Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2) {
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(src2);
  odsState.addTypes(res);
}

FMed3Op FMed3Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src0, src1, src2);
  auto __res__ = ::llvm::dyn_cast<FMed3Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

FMed3Op FMed3Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2) {
  return create(builder, builder.getLoc(), res, src0, src1, src2);
}

void FMed3Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2) {
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(src2);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

FMed3Op FMed3Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src0, src1, src2);
  auto __res__ = ::llvm::dyn_cast<FMed3Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

FMed3Op FMed3Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2) {
  return create(builder, builder.getLoc(), resultTypes, src0, src1, src2);
}

void FMed3Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

FMed3Op FMed3Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<FMed3Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

FMed3Op FMed3Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void FMed3Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

FMed3Op FMed3Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<FMed3Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

FMed3Op FMed3Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult FMed3Op::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps24(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps24(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps24(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps24(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  if (!((((*this->getODSResults(0).begin()).getType()) == ((*this->getODSOperands(0).begin()).getType()) && ((*this->getODSOperands(0).begin()).getType()) == ((*this->getODSOperands(1).begin()).getType()) && ((*this->getODSOperands(1).begin()).getType()) == ((*this->getODSOperands(2).begin()).getType()) && ((*this->getODSOperands(2).begin()).getType()) == ((*this->getODSResults(0).begin()).getType()))))
    return emitOpError("failed to verify that all of {res, src0, src1, src2} have same type");
  return ::mlir::success();
}

::llvm::LogicalResult FMed3Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult FMed3Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand src1RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src1Operands(&src1RawOperand, 1);  ::llvm::SMLoc src1OperandsLoc;
  (void)src1OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand src2RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src2Operands(&src2RawOperand, 1);  ::llvm::SMLoc src2OperandsLoc;
  (void)src2OperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  src1OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src1RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  src2OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src2RawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(src0Operands, resTypes[0], src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src1Operands, resTypes[0], src1OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src2Operands, resTypes[0], src2OperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void FMed3Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc1();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc2();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void FMed3Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::FMed3Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::GetBarrierStateOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

GetBarrierStateOpGenericAdaptorBase::GetBarrierStateOpGenericAdaptorBase(GetBarrierStateOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t GetBarrierStateOpGenericAdaptorBase::getId() {
  auto attr = getIdAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
GetBarrierStateOpAdaptor::GetBarrierStateOpAdaptor(GetBarrierStateOp op) : GetBarrierStateOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult GetBarrierStateOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_id = getProperties().id; (void)tblgen_id;
  if (!tblgen_id) return emitError(loc, "'rocdl.s.get.barrier.state' op requires attribute 'id'");

  if (tblgen_id && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_id))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_id).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.s.get.barrier.state' op attribute 'id' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult GetBarrierStateOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.id;
       auto attr = dict.get("id");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `id` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute GetBarrierStateOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.id;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("id",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code GetBarrierStateOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.id.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> GetBarrierStateOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "id")
      return prop.id;
  return std::nullopt;
}

void GetBarrierStateOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "id") {
       prop.id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.id)>>(value);
       return;
    }
}

void GetBarrierStateOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.id) attrs.append("id", prop.id);
}

::llvm::LogicalResult GetBarrierStateOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getIdAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "id", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult GetBarrierStateOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.id)))
    return ::mlir::failure();
  return ::mlir::success();
}

void GetBarrierStateOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.id);
}

uint32_t GetBarrierStateOp::getId() {
  auto attr = getIdAttr();
  return attr.getValue().getZExtValue();
}

void GetBarrierStateOp::setId(uint32_t attrValue) {
  getProperties().id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void GetBarrierStateOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr id) {
  odsState.getOrAddProperties<Properties>().id = id;
  odsState.addTypes(res);
}

GetBarrierStateOp GetBarrierStateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, id);
  auto __res__ = ::llvm::dyn_cast<GetBarrierStateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GetBarrierStateOp GetBarrierStateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr id) {
  return create(builder, builder.getLoc(), res, id);
}

void GetBarrierStateOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  odsState.getOrAddProperties<Properties>().id = id;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GetBarrierStateOp GetBarrierStateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, id);
  auto __res__ = ::llvm::dyn_cast<GetBarrierStateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GetBarrierStateOp GetBarrierStateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr id) {
  return create(builder, builder.getLoc(), resultTypes, id);
}

void GetBarrierStateOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, uint32_t id) {
  odsState.getOrAddProperties<Properties>().id = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), id);
  odsState.addTypes(res);
}

GetBarrierStateOp GetBarrierStateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, uint32_t id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, id);
  auto __res__ = ::llvm::dyn_cast<GetBarrierStateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GetBarrierStateOp GetBarrierStateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, uint32_t id) {
  return create(builder, builder.getLoc(), res, id);
}

void GetBarrierStateOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t id) {
  odsState.getOrAddProperties<Properties>().id = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), id);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GetBarrierStateOp GetBarrierStateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t id) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, id);
  auto __res__ = ::llvm::dyn_cast<GetBarrierStateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GetBarrierStateOp GetBarrierStateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t id) {
  return create(builder, builder.getLoc(), resultTypes, id);
}

void GetBarrierStateOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<GetBarrierStateOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

GetBarrierStateOp GetBarrierStateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<GetBarrierStateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GetBarrierStateOp GetBarrierStateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void GetBarrierStateOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GetBarrierStateOp GetBarrierStateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<GetBarrierStateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GetBarrierStateOp GetBarrierStateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult GetBarrierStateOp::verifyInvariantsImpl() {
  auto tblgen_id = getProperties().id; (void)tblgen_id;
  if (!tblgen_id) return emitOpError("requires attribute 'id'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_id, "id")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult GetBarrierStateOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult GetBarrierStateOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr idAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  if (parser.parseCustomAttributeWithFallback(idAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (idAttr) result.getOrAddProperties<GetBarrierStateOp::Properties>().id = idAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void GetBarrierStateOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getIdAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("id");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::GetBarrierStateOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::GetNamedBarrierStateOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

GetNamedBarrierStateOpGenericAdaptorBase::GetNamedBarrierStateOpGenericAdaptorBase(GetNamedBarrierStateOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
GetNamedBarrierStateOpAdaptor::GetNamedBarrierStateOpAdaptor(GetNamedBarrierStateOp op) : GetNamedBarrierStateOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult GetNamedBarrierStateOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult GetNamedBarrierStateOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute GetNamedBarrierStateOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code GetNamedBarrierStateOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> GetNamedBarrierStateOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void GetNamedBarrierStateOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void GetNamedBarrierStateOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult GetNamedBarrierStateOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void GetNamedBarrierStateOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr) {
  odsState.addOperands(ptr);
  odsState.addTypes(res);
}

GetNamedBarrierStateOp GetNamedBarrierStateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, ptr);
  auto __res__ = ::llvm::dyn_cast<GetNamedBarrierStateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GetNamedBarrierStateOp GetNamedBarrierStateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr) {
  return create(builder, builder.getLoc(), res, ptr);
}

void GetNamedBarrierStateOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr) {
  odsState.addOperands(ptr);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GetNamedBarrierStateOp GetNamedBarrierStateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr);
  auto __res__ = ::llvm::dyn_cast<GetNamedBarrierStateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GetNamedBarrierStateOp GetNamedBarrierStateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr) {
  return create(builder, builder.getLoc(), resultTypes, ptr);
}

void GetNamedBarrierStateOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GetNamedBarrierStateOp GetNamedBarrierStateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<GetNamedBarrierStateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GetNamedBarrierStateOp GetNamedBarrierStateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void GetNamedBarrierStateOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GetNamedBarrierStateOp GetNamedBarrierStateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<GetNamedBarrierStateOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GetNamedBarrierStateOp GetNamedBarrierStateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult GetNamedBarrierStateOp::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult GetNamedBarrierStateOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult GetNamedBarrierStateOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(3);
  result.addTypes(resTypes);
  if (parser.resolveOperands(ptrOperands, odsBuildableType0, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void GetNamedBarrierStateOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::GetNamedBarrierStateOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::GlobalLoadAsyncToLDSB128Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

GlobalLoadAsyncToLDSB128OpGenericAdaptorBase::GlobalLoadAsyncToLDSB128OpGenericAdaptorBase(GlobalLoadAsyncToLDSB128Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t GlobalLoadAsyncToLDSB128OpGenericAdaptorBase::getOffset() {
  auto attr = getOffsetAttr();
  return attr.getValue().getZExtValue();
}

uint32_t GlobalLoadAsyncToLDSB128OpGenericAdaptorBase::getAux() {
  auto attr = getAuxAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB128OpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB128OpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB128OpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
GlobalLoadAsyncToLDSB128OpAdaptor::GlobalLoadAsyncToLDSB128OpAdaptor(GlobalLoadAsyncToLDSB128Op op) : GlobalLoadAsyncToLDSB128OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult GlobalLoadAsyncToLDSB128OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_aux = getProperties().aux; (void)tblgen_aux;
  if (!tblgen_aux) return emitError(loc, "'rocdl.global.load.async.to.lds.b128' op requires attribute 'aux'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_offset = getProperties().offset; (void)tblgen_offset;
  if (!tblgen_offset) return emitError(loc, "'rocdl.global.load.async.to.lds.b128' op requires attribute 'offset'");
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_offset && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_offset))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_offset).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b128' op attribute 'offset' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_aux && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_aux))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_aux).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b128' op attribute 'aux' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b128' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b128' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b128' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB128Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.aux;
       auto attr = dict.get("aux");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `aux` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.offset;
       auto attr = dict.get("offset");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `offset` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute GlobalLoadAsyncToLDSB128Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.aux;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("aux",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.offset;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("offset",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code GlobalLoadAsyncToLDSB128Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.aux.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.offset.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> GlobalLoadAsyncToLDSB128Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "aux")
      return prop.aux;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "offset")
      return prop.offset;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void GlobalLoadAsyncToLDSB128Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "aux") {
       prop.aux = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.aux)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "offset") {
       prop.offset = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.offset)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void GlobalLoadAsyncToLDSB128Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.aux) attrs.append("aux", prop.aux);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.offset) attrs.append("offset", prop.offset);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB128Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getAuxAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "aux", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getOffsetAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "offset", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB128Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.aux)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.offset)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadAsyncToLDSB128Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);
  writer.writeAttribute(prop.aux);

  writer.writeOptionalAttribute(prop.noalias_scopes);
  writer.writeAttribute(prop.offset);

  writer.writeOptionalAttribute(prop.tbaa);
}

uint32_t GlobalLoadAsyncToLDSB128Op::getOffset() {
  auto attr = getOffsetAttr();
  return attr.getValue().getZExtValue();
}

uint32_t GlobalLoadAsyncToLDSB128Op::getAux() {
  auto attr = getAuxAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB128Op::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB128Op::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB128Op::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void GlobalLoadAsyncToLDSB128Op::setOffset(uint32_t attrValue) {
  getProperties().offset = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void GlobalLoadAsyncToLDSB128Op::setAux(uint32_t attrValue) {
  getProperties().aux = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void GlobalLoadAsyncToLDSB128Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = offset;
  odsState.getOrAddProperties<Properties>().aux = aux;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

GlobalLoadAsyncToLDSB128Op GlobalLoadAsyncToLDSB128Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB128Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB128Op GlobalLoadAsyncToLDSB128Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB128Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = offset;
  odsState.getOrAddProperties<Properties>().aux = aux;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GlobalLoadAsyncToLDSB128Op GlobalLoadAsyncToLDSB128Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB128Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB128Op GlobalLoadAsyncToLDSB128Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB128Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), offset);
  odsState.getOrAddProperties<Properties>().aux = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

GlobalLoadAsyncToLDSB128Op GlobalLoadAsyncToLDSB128Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB128Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB128Op GlobalLoadAsyncToLDSB128Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB128Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), offset);
  odsState.getOrAddProperties<Properties>().aux = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GlobalLoadAsyncToLDSB128Op GlobalLoadAsyncToLDSB128Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB128Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB128Op GlobalLoadAsyncToLDSB128Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB128Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<GlobalLoadAsyncToLDSB128Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

GlobalLoadAsyncToLDSB128Op GlobalLoadAsyncToLDSB128Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB128Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB128Op GlobalLoadAsyncToLDSB128Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void GlobalLoadAsyncToLDSB128Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GlobalLoadAsyncToLDSB128Op GlobalLoadAsyncToLDSB128Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB128Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB128Op GlobalLoadAsyncToLDSB128Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB128Op::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_aux = getProperties().aux; (void)tblgen_aux;
  if (!tblgen_aux) return emitOpError("requires attribute 'aux'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_offset = getProperties().offset; (void)tblgen_offset;
  if (!tblgen_offset) return emitOpError("requires attribute 'offset'");
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_offset, "offset")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_aux, "aux")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps25(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB128Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult GlobalLoadAsyncToLDSB128Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand globalPtrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> globalPtrOperands(&globalPtrRawOperand, 1);  ::llvm::SMLoc globalPtrOperandsLoc;
  (void)globalPtrOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand ldsPtrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ldsPtrOperands(&ldsPtrRawOperand, 1);  ::llvm::SMLoc ldsPtrOperandsLoc;
  (void)ldsPtrOperandsLoc;
  ::mlir::IntegerAttr offsetAttr;
  ::mlir::IntegerAttr auxAttr;
  ::mlir::Type globalPtrRawType{};
  ::llvm::ArrayRef<::mlir::Type> globalPtrTypes(&globalPtrRawType, 1);
  ::mlir::Type ldsPtrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ldsPtrTypes(&ldsPtrRawType, 1);

  globalPtrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(globalPtrRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  ldsPtrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ldsPtrRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(offsetAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (offsetAttr) result.getOrAddProperties<GlobalLoadAsyncToLDSB128Op::Properties>().offset = offsetAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(auxAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (auxAttr) result.getOrAddProperties<GlobalLoadAsyncToLDSB128Op::Properties>().aux = auxAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    globalPtrRawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    ldsPtrRawType = type;
  }
  if (parser.resolveOperands(globalPtrOperands, globalPtrTypes, globalPtrOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(ldsPtrOperands, ldsPtrTypes, ldsPtrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadAsyncToLDSB128Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getGlobalPtr();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getLdsPtr();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getOffsetAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getAuxAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("offset");
  elidedAttrs.push_back("aux");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getGlobalPtr().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getLdsPtr().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void GlobalLoadAsyncToLDSB128Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Write::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> GlobalLoadAsyncToLDSB128Op::getAccessedOperands() {
  return {getGlobalPtr(), getLdsPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::GlobalLoadAsyncToLDSB128Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::GlobalLoadAsyncToLDSB32Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

GlobalLoadAsyncToLDSB32OpGenericAdaptorBase::GlobalLoadAsyncToLDSB32OpGenericAdaptorBase(GlobalLoadAsyncToLDSB32Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t GlobalLoadAsyncToLDSB32OpGenericAdaptorBase::getOffset() {
  auto attr = getOffsetAttr();
  return attr.getValue().getZExtValue();
}

uint32_t GlobalLoadAsyncToLDSB32OpGenericAdaptorBase::getAux() {
  auto attr = getAuxAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB32OpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB32OpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB32OpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
GlobalLoadAsyncToLDSB32OpAdaptor::GlobalLoadAsyncToLDSB32OpAdaptor(GlobalLoadAsyncToLDSB32Op op) : GlobalLoadAsyncToLDSB32OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult GlobalLoadAsyncToLDSB32OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_aux = getProperties().aux; (void)tblgen_aux;
  if (!tblgen_aux) return emitError(loc, "'rocdl.global.load.async.to.lds.b32' op requires attribute 'aux'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_offset = getProperties().offset; (void)tblgen_offset;
  if (!tblgen_offset) return emitError(loc, "'rocdl.global.load.async.to.lds.b32' op requires attribute 'offset'");
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_offset && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_offset))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_offset).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b32' op attribute 'offset' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_aux && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_aux))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_aux).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b32' op attribute 'aux' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b32' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b32' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b32' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB32Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.aux;
       auto attr = dict.get("aux");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `aux` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.offset;
       auto attr = dict.get("offset");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `offset` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute GlobalLoadAsyncToLDSB32Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.aux;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("aux",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.offset;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("offset",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code GlobalLoadAsyncToLDSB32Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.aux.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.offset.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> GlobalLoadAsyncToLDSB32Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "aux")
      return prop.aux;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "offset")
      return prop.offset;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void GlobalLoadAsyncToLDSB32Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "aux") {
       prop.aux = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.aux)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "offset") {
       prop.offset = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.offset)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void GlobalLoadAsyncToLDSB32Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.aux) attrs.append("aux", prop.aux);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.offset) attrs.append("offset", prop.offset);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB32Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getAuxAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "aux", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getOffsetAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "offset", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB32Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.aux)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.offset)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadAsyncToLDSB32Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);
  writer.writeAttribute(prop.aux);

  writer.writeOptionalAttribute(prop.noalias_scopes);
  writer.writeAttribute(prop.offset);

  writer.writeOptionalAttribute(prop.tbaa);
}

uint32_t GlobalLoadAsyncToLDSB32Op::getOffset() {
  auto attr = getOffsetAttr();
  return attr.getValue().getZExtValue();
}

uint32_t GlobalLoadAsyncToLDSB32Op::getAux() {
  auto attr = getAuxAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB32Op::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB32Op::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB32Op::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void GlobalLoadAsyncToLDSB32Op::setOffset(uint32_t attrValue) {
  getProperties().offset = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void GlobalLoadAsyncToLDSB32Op::setAux(uint32_t attrValue) {
  getProperties().aux = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void GlobalLoadAsyncToLDSB32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = offset;
  odsState.getOrAddProperties<Properties>().aux = aux;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

GlobalLoadAsyncToLDSB32Op GlobalLoadAsyncToLDSB32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB32Op GlobalLoadAsyncToLDSB32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = offset;
  odsState.getOrAddProperties<Properties>().aux = aux;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GlobalLoadAsyncToLDSB32Op GlobalLoadAsyncToLDSB32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB32Op GlobalLoadAsyncToLDSB32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), offset);
  odsState.getOrAddProperties<Properties>().aux = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

GlobalLoadAsyncToLDSB32Op GlobalLoadAsyncToLDSB32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB32Op GlobalLoadAsyncToLDSB32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB32Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), offset);
  odsState.getOrAddProperties<Properties>().aux = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GlobalLoadAsyncToLDSB32Op GlobalLoadAsyncToLDSB32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB32Op GlobalLoadAsyncToLDSB32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<GlobalLoadAsyncToLDSB32Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

GlobalLoadAsyncToLDSB32Op GlobalLoadAsyncToLDSB32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB32Op GlobalLoadAsyncToLDSB32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void GlobalLoadAsyncToLDSB32Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GlobalLoadAsyncToLDSB32Op GlobalLoadAsyncToLDSB32Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB32Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB32Op GlobalLoadAsyncToLDSB32Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB32Op::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_aux = getProperties().aux; (void)tblgen_aux;
  if (!tblgen_aux) return emitOpError("requires attribute 'aux'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_offset = getProperties().offset; (void)tblgen_offset;
  if (!tblgen_offset) return emitOpError("requires attribute 'offset'");
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_offset, "offset")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_aux, "aux")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps25(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB32Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult GlobalLoadAsyncToLDSB32Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand globalPtrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> globalPtrOperands(&globalPtrRawOperand, 1);  ::llvm::SMLoc globalPtrOperandsLoc;
  (void)globalPtrOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand ldsPtrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ldsPtrOperands(&ldsPtrRawOperand, 1);  ::llvm::SMLoc ldsPtrOperandsLoc;
  (void)ldsPtrOperandsLoc;
  ::mlir::IntegerAttr offsetAttr;
  ::mlir::IntegerAttr auxAttr;
  ::mlir::Type globalPtrRawType{};
  ::llvm::ArrayRef<::mlir::Type> globalPtrTypes(&globalPtrRawType, 1);
  ::mlir::Type ldsPtrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ldsPtrTypes(&ldsPtrRawType, 1);

  globalPtrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(globalPtrRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  ldsPtrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ldsPtrRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(offsetAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (offsetAttr) result.getOrAddProperties<GlobalLoadAsyncToLDSB32Op::Properties>().offset = offsetAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(auxAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (auxAttr) result.getOrAddProperties<GlobalLoadAsyncToLDSB32Op::Properties>().aux = auxAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    globalPtrRawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    ldsPtrRawType = type;
  }
  if (parser.resolveOperands(globalPtrOperands, globalPtrTypes, globalPtrOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(ldsPtrOperands, ldsPtrTypes, ldsPtrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadAsyncToLDSB32Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getGlobalPtr();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getLdsPtr();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getOffsetAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getAuxAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("offset");
  elidedAttrs.push_back("aux");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getGlobalPtr().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getLdsPtr().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void GlobalLoadAsyncToLDSB32Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Write::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> GlobalLoadAsyncToLDSB32Op::getAccessedOperands() {
  return {getGlobalPtr(), getLdsPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::GlobalLoadAsyncToLDSB32Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::GlobalLoadAsyncToLDSB64Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

GlobalLoadAsyncToLDSB64OpGenericAdaptorBase::GlobalLoadAsyncToLDSB64OpGenericAdaptorBase(GlobalLoadAsyncToLDSB64Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t GlobalLoadAsyncToLDSB64OpGenericAdaptorBase::getOffset() {
  auto attr = getOffsetAttr();
  return attr.getValue().getZExtValue();
}

uint32_t GlobalLoadAsyncToLDSB64OpGenericAdaptorBase::getAux() {
  auto attr = getAuxAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB64OpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB64OpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB64OpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
GlobalLoadAsyncToLDSB64OpAdaptor::GlobalLoadAsyncToLDSB64OpAdaptor(GlobalLoadAsyncToLDSB64Op op) : GlobalLoadAsyncToLDSB64OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult GlobalLoadAsyncToLDSB64OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_aux = getProperties().aux; (void)tblgen_aux;
  if (!tblgen_aux) return emitError(loc, "'rocdl.global.load.async.to.lds.b64' op requires attribute 'aux'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_offset = getProperties().offset; (void)tblgen_offset;
  if (!tblgen_offset) return emitError(loc, "'rocdl.global.load.async.to.lds.b64' op requires attribute 'offset'");
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_offset && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_offset))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_offset).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b64' op attribute 'offset' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_aux && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_aux))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_aux).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b64' op attribute 'aux' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b64' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b64' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b64' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB64Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.aux;
       auto attr = dict.get("aux");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `aux` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.offset;
       auto attr = dict.get("offset");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `offset` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute GlobalLoadAsyncToLDSB64Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.aux;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("aux",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.offset;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("offset",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code GlobalLoadAsyncToLDSB64Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.aux.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.offset.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> GlobalLoadAsyncToLDSB64Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "aux")
      return prop.aux;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "offset")
      return prop.offset;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void GlobalLoadAsyncToLDSB64Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "aux") {
       prop.aux = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.aux)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "offset") {
       prop.offset = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.offset)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void GlobalLoadAsyncToLDSB64Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.aux) attrs.append("aux", prop.aux);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.offset) attrs.append("offset", prop.offset);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB64Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getAuxAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "aux", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getOffsetAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "offset", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB64Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.aux)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.offset)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadAsyncToLDSB64Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);
  writer.writeAttribute(prop.aux);

  writer.writeOptionalAttribute(prop.noalias_scopes);
  writer.writeAttribute(prop.offset);

  writer.writeOptionalAttribute(prop.tbaa);
}

uint32_t GlobalLoadAsyncToLDSB64Op::getOffset() {
  auto attr = getOffsetAttr();
  return attr.getValue().getZExtValue();
}

uint32_t GlobalLoadAsyncToLDSB64Op::getAux() {
  auto attr = getAuxAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB64Op::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB64Op::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB64Op::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void GlobalLoadAsyncToLDSB64Op::setOffset(uint32_t attrValue) {
  getProperties().offset = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void GlobalLoadAsyncToLDSB64Op::setAux(uint32_t attrValue) {
  getProperties().aux = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void GlobalLoadAsyncToLDSB64Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = offset;
  odsState.getOrAddProperties<Properties>().aux = aux;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

GlobalLoadAsyncToLDSB64Op GlobalLoadAsyncToLDSB64Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB64Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB64Op GlobalLoadAsyncToLDSB64Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB64Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = offset;
  odsState.getOrAddProperties<Properties>().aux = aux;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GlobalLoadAsyncToLDSB64Op GlobalLoadAsyncToLDSB64Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB64Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB64Op GlobalLoadAsyncToLDSB64Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB64Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), offset);
  odsState.getOrAddProperties<Properties>().aux = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

GlobalLoadAsyncToLDSB64Op GlobalLoadAsyncToLDSB64Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB64Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB64Op GlobalLoadAsyncToLDSB64Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB64Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), offset);
  odsState.getOrAddProperties<Properties>().aux = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GlobalLoadAsyncToLDSB64Op GlobalLoadAsyncToLDSB64Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB64Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB64Op GlobalLoadAsyncToLDSB64Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB64Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<GlobalLoadAsyncToLDSB64Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

GlobalLoadAsyncToLDSB64Op GlobalLoadAsyncToLDSB64Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB64Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB64Op GlobalLoadAsyncToLDSB64Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void GlobalLoadAsyncToLDSB64Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GlobalLoadAsyncToLDSB64Op GlobalLoadAsyncToLDSB64Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB64Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB64Op GlobalLoadAsyncToLDSB64Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB64Op::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_aux = getProperties().aux; (void)tblgen_aux;
  if (!tblgen_aux) return emitOpError("requires attribute 'aux'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_offset = getProperties().offset; (void)tblgen_offset;
  if (!tblgen_offset) return emitOpError("requires attribute 'offset'");
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_offset, "offset")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_aux, "aux")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps25(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB64Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult GlobalLoadAsyncToLDSB64Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand globalPtrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> globalPtrOperands(&globalPtrRawOperand, 1);  ::llvm::SMLoc globalPtrOperandsLoc;
  (void)globalPtrOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand ldsPtrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ldsPtrOperands(&ldsPtrRawOperand, 1);  ::llvm::SMLoc ldsPtrOperandsLoc;
  (void)ldsPtrOperandsLoc;
  ::mlir::IntegerAttr offsetAttr;
  ::mlir::IntegerAttr auxAttr;
  ::mlir::Type globalPtrRawType{};
  ::llvm::ArrayRef<::mlir::Type> globalPtrTypes(&globalPtrRawType, 1);
  ::mlir::Type ldsPtrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ldsPtrTypes(&ldsPtrRawType, 1);

  globalPtrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(globalPtrRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  ldsPtrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ldsPtrRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(offsetAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (offsetAttr) result.getOrAddProperties<GlobalLoadAsyncToLDSB64Op::Properties>().offset = offsetAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(auxAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (auxAttr) result.getOrAddProperties<GlobalLoadAsyncToLDSB64Op::Properties>().aux = auxAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    globalPtrRawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    ldsPtrRawType = type;
  }
  if (parser.resolveOperands(globalPtrOperands, globalPtrTypes, globalPtrOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(ldsPtrOperands, ldsPtrTypes, ldsPtrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadAsyncToLDSB64Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getGlobalPtr();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getLdsPtr();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getOffsetAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getAuxAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("offset");
  elidedAttrs.push_back("aux");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getGlobalPtr().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getLdsPtr().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void GlobalLoadAsyncToLDSB64Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Write::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> GlobalLoadAsyncToLDSB64Op::getAccessedOperands() {
  return {getGlobalPtr(), getLdsPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::GlobalLoadAsyncToLDSB64Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::GlobalLoadAsyncToLDSB8Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

GlobalLoadAsyncToLDSB8OpGenericAdaptorBase::GlobalLoadAsyncToLDSB8OpGenericAdaptorBase(GlobalLoadAsyncToLDSB8Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t GlobalLoadAsyncToLDSB8OpGenericAdaptorBase::getOffset() {
  auto attr = getOffsetAttr();
  return attr.getValue().getZExtValue();
}

uint32_t GlobalLoadAsyncToLDSB8OpGenericAdaptorBase::getAux() {
  auto attr = getAuxAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB8OpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB8OpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB8OpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
GlobalLoadAsyncToLDSB8OpAdaptor::GlobalLoadAsyncToLDSB8OpAdaptor(GlobalLoadAsyncToLDSB8Op op) : GlobalLoadAsyncToLDSB8OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult GlobalLoadAsyncToLDSB8OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_aux = getProperties().aux; (void)tblgen_aux;
  if (!tblgen_aux) return emitError(loc, "'rocdl.global.load.async.to.lds.b8' op requires attribute 'aux'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_offset = getProperties().offset; (void)tblgen_offset;
  if (!tblgen_offset) return emitError(loc, "'rocdl.global.load.async.to.lds.b8' op requires attribute 'offset'");
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_offset && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_offset))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_offset).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b8' op attribute 'offset' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_aux && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_aux))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_aux).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b8' op attribute 'aux' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b8' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b8' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.async.to.lds.b8' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB8Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.aux;
       auto attr = dict.get("aux");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `aux` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.offset;
       auto attr = dict.get("offset");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `offset` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute GlobalLoadAsyncToLDSB8Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.aux;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("aux",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.offset;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("offset",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code GlobalLoadAsyncToLDSB8Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.aux.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.offset.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> GlobalLoadAsyncToLDSB8Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "aux")
      return prop.aux;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "offset")
      return prop.offset;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void GlobalLoadAsyncToLDSB8Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "aux") {
       prop.aux = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.aux)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "offset") {
       prop.offset = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.offset)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void GlobalLoadAsyncToLDSB8Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.aux) attrs.append("aux", prop.aux);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.offset) attrs.append("offset", prop.offset);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB8Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getAuxAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "aux", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getOffsetAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "offset", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB8Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.aux)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.offset)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadAsyncToLDSB8Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);
  writer.writeAttribute(prop.aux);

  writer.writeOptionalAttribute(prop.noalias_scopes);
  writer.writeAttribute(prop.offset);

  writer.writeOptionalAttribute(prop.tbaa);
}

uint32_t GlobalLoadAsyncToLDSB8Op::getOffset() {
  auto attr = getOffsetAttr();
  return attr.getValue().getZExtValue();
}

uint32_t GlobalLoadAsyncToLDSB8Op::getAux() {
  auto attr = getAuxAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB8Op::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB8Op::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadAsyncToLDSB8Op::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void GlobalLoadAsyncToLDSB8Op::setOffset(uint32_t attrValue) {
  getProperties().offset = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void GlobalLoadAsyncToLDSB8Op::setAux(uint32_t attrValue) {
  getProperties().aux = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void GlobalLoadAsyncToLDSB8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = offset;
  odsState.getOrAddProperties<Properties>().aux = aux;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

GlobalLoadAsyncToLDSB8Op GlobalLoadAsyncToLDSB8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB8Op GlobalLoadAsyncToLDSB8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = offset;
  odsState.getOrAddProperties<Properties>().aux = aux;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GlobalLoadAsyncToLDSB8Op GlobalLoadAsyncToLDSB8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB8Op GlobalLoadAsyncToLDSB8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), offset);
  odsState.getOrAddProperties<Properties>().aux = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

GlobalLoadAsyncToLDSB8Op GlobalLoadAsyncToLDSB8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB8Op GlobalLoadAsyncToLDSB8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB8Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().offset = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), offset);
  odsState.getOrAddProperties<Properties>().aux = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GlobalLoadAsyncToLDSB8Op GlobalLoadAsyncToLDSB8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB8Op GlobalLoadAsyncToLDSB8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, globalPtr, ldsPtr, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadAsyncToLDSB8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<GlobalLoadAsyncToLDSB8Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

GlobalLoadAsyncToLDSB8Op GlobalLoadAsyncToLDSB8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB8Op GlobalLoadAsyncToLDSB8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void GlobalLoadAsyncToLDSB8Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GlobalLoadAsyncToLDSB8Op GlobalLoadAsyncToLDSB8Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadAsyncToLDSB8Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadAsyncToLDSB8Op GlobalLoadAsyncToLDSB8Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB8Op::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_aux = getProperties().aux; (void)tblgen_aux;
  if (!tblgen_aux) return emitOpError("requires attribute 'aux'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_offset = getProperties().offset; (void)tblgen_offset;
  if (!tblgen_offset) return emitOpError("requires attribute 'offset'");
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_offset, "offset")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_aux, "aux")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps25(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadAsyncToLDSB8Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult GlobalLoadAsyncToLDSB8Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand globalPtrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> globalPtrOperands(&globalPtrRawOperand, 1);  ::llvm::SMLoc globalPtrOperandsLoc;
  (void)globalPtrOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand ldsPtrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ldsPtrOperands(&ldsPtrRawOperand, 1);  ::llvm::SMLoc ldsPtrOperandsLoc;
  (void)ldsPtrOperandsLoc;
  ::mlir::IntegerAttr offsetAttr;
  ::mlir::IntegerAttr auxAttr;
  ::mlir::Type globalPtrRawType{};
  ::llvm::ArrayRef<::mlir::Type> globalPtrTypes(&globalPtrRawType, 1);
  ::mlir::Type ldsPtrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ldsPtrTypes(&ldsPtrRawType, 1);

  globalPtrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(globalPtrRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  ldsPtrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ldsPtrRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(offsetAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (offsetAttr) result.getOrAddProperties<GlobalLoadAsyncToLDSB8Op::Properties>().offset = offsetAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(auxAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (auxAttr) result.getOrAddProperties<GlobalLoadAsyncToLDSB8Op::Properties>().aux = auxAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    globalPtrRawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    ldsPtrRawType = type;
  }
  if (parser.resolveOperands(globalPtrOperands, globalPtrTypes, globalPtrOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(ldsPtrOperands, ldsPtrTypes, ldsPtrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadAsyncToLDSB8Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getGlobalPtr();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getLdsPtr();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getOffsetAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getAuxAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("offset");
  elidedAttrs.push_back("aux");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getGlobalPtr().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getLdsPtr().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void GlobalLoadAsyncToLDSB8Op::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Write::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> GlobalLoadAsyncToLDSB8Op::getAccessedOperands() {
  return {getGlobalPtr(), getLdsPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::GlobalLoadAsyncToLDSB8Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::GlobalLoadLDSOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

GlobalLoadLDSOpGenericAdaptorBase::GlobalLoadLDSOpGenericAdaptorBase(GlobalLoadLDSOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t GlobalLoadLDSOpGenericAdaptorBase::getSize() {
  auto attr = getSizeAttr();
  return attr.getValue().getZExtValue();
}

uint32_t GlobalLoadLDSOpGenericAdaptorBase::getOffset() {
  auto attr = getOffsetAttr();
  return attr.getValue().getZExtValue();
}

uint32_t GlobalLoadLDSOpGenericAdaptorBase::getAux() {
  auto attr = getAuxAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadLDSOpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadLDSOpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadLDSOpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
GlobalLoadLDSOpAdaptor::GlobalLoadLDSOpAdaptor(GlobalLoadLDSOp op) : GlobalLoadLDSOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult GlobalLoadLDSOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_aux = getProperties().aux; (void)tblgen_aux;
  if (!tblgen_aux) return emitError(loc, "'rocdl.global.load.lds' op requires attribute 'aux'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_offset = getProperties().offset; (void)tblgen_offset;
  if (!tblgen_offset) return emitError(loc, "'rocdl.global.load.lds' op requires attribute 'offset'");
  auto tblgen_size = getProperties().size; (void)tblgen_size;
  if (!tblgen_size) return emitError(loc, "'rocdl.global.load.lds' op requires attribute 'size'");
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_size && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_size))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_size).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.global.load.lds' op attribute 'size' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_offset && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_offset))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_offset).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.global.load.lds' op attribute 'offset' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_aux && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_aux))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_aux).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.global.load.lds' op attribute 'aux' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.lds' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.lds' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.lds' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadLDSOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.aux;
       auto attr = dict.get("aux");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `aux` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.offset;
       auto attr = dict.get("offset");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `offset` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.size;
       auto attr = dict.get("size");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `size` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute GlobalLoadLDSOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.aux;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("aux",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.offset;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("offset",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.size;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("size",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code GlobalLoadLDSOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.aux.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.offset.getAsOpaquePointer()), 
    llvm::hash_value(prop.size.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> GlobalLoadLDSOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "aux")
      return prop.aux;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "offset")
      return prop.offset;

    if (name == "size")
      return prop.size;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void GlobalLoadLDSOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "aux") {
       prop.aux = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.aux)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "offset") {
       prop.offset = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.offset)>>(value);
       return;
    }

    if (name == "size") {
       prop.size = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.size)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void GlobalLoadLDSOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.aux) attrs.append("aux", prop.aux);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.offset) attrs.append("offset", prop.offset);

    if (prop.size) attrs.append("size", prop.size);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult GlobalLoadLDSOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getAuxAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "aux", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getOffsetAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "offset", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSizeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "size", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadLDSOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.aux)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.offset)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.size)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadLDSOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);
  writer.writeAttribute(prop.aux);

  writer.writeOptionalAttribute(prop.noalias_scopes);
  writer.writeAttribute(prop.offset);
  writer.writeAttribute(prop.size);

  writer.writeOptionalAttribute(prop.tbaa);
}

uint32_t GlobalLoadLDSOp::getSize() {
  auto attr = getSizeAttr();
  return attr.getValue().getZExtValue();
}

uint32_t GlobalLoadLDSOp::getOffset() {
  auto attr = getOffsetAttr();
  return attr.getValue().getZExtValue();
}

uint32_t GlobalLoadLDSOp::getAux() {
  auto attr = getAuxAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadLDSOp::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadLDSOp::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadLDSOp::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void GlobalLoadLDSOp::setSize(uint32_t attrValue) {
  getProperties().size = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void GlobalLoadLDSOp::setOffset(uint32_t attrValue) {
  getProperties().offset = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void GlobalLoadLDSOp::setAux(uint32_t attrValue) {
  getProperties().aux = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void GlobalLoadLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr size, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().size = size;
  odsState.getOrAddProperties<Properties>().offset = offset;
  odsState.getOrAddProperties<Properties>().aux = aux;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

GlobalLoadLDSOp GlobalLoadLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr size, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadLDSOp GlobalLoadLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr size, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr size, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().size = size;
  odsState.getOrAddProperties<Properties>().offset = offset;
  odsState.getOrAddProperties<Properties>().aux = aux;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GlobalLoadLDSOp GlobalLoadLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr size, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadLDSOp GlobalLoadLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr size, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t size, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().size = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), size);
  odsState.getOrAddProperties<Properties>().offset = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), offset);
  odsState.getOrAddProperties<Properties>().aux = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

GlobalLoadLDSOp GlobalLoadLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t size, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadLDSOp GlobalLoadLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t size, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t size, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().size = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), size);
  odsState.getOrAddProperties<Properties>().offset = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), offset);
  odsState.getOrAddProperties<Properties>().aux = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GlobalLoadLDSOp GlobalLoadLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t size, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadLDSOp GlobalLoadLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t size, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadLDSOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<GlobalLoadLDSOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

GlobalLoadLDSOp GlobalLoadLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadLDSOp GlobalLoadLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void GlobalLoadLDSOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GlobalLoadLDSOp GlobalLoadLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadLDSOp GlobalLoadLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult GlobalLoadLDSOp::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_aux = getProperties().aux; (void)tblgen_aux;
  if (!tblgen_aux) return emitOpError("requires attribute 'aux'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_offset = getProperties().offset; (void)tblgen_offset;
  if (!tblgen_offset) return emitOpError("requires attribute 'offset'");
  auto tblgen_size = getProperties().size; (void)tblgen_size;
  if (!tblgen_size) return emitOpError("requires attribute 'size'");
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_size, "size")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_offset, "offset")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_aux, "aux")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps25(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadLDSOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult GlobalLoadLDSOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand globalPtrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> globalPtrOperands(&globalPtrRawOperand, 1);  ::llvm::SMLoc globalPtrOperandsLoc;
  (void)globalPtrOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand ldsPtrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ldsPtrOperands(&ldsPtrRawOperand, 1);  ::llvm::SMLoc ldsPtrOperandsLoc;
  (void)ldsPtrOperandsLoc;
  ::mlir::IntegerAttr sizeAttr;
  ::mlir::IntegerAttr offsetAttr;
  ::mlir::IntegerAttr auxAttr;

  globalPtrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(globalPtrRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  ldsPtrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ldsPtrRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(sizeAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (sizeAttr) result.getOrAddProperties<GlobalLoadLDSOp::Properties>().size = sizeAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(offsetAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (offsetAttr) result.getOrAddProperties<GlobalLoadLDSOp::Properties>().offset = offsetAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(auxAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (auxAttr) result.getOrAddProperties<GlobalLoadLDSOp::Properties>().aux = auxAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(1);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(3);
  if (parser.resolveOperands(globalPtrOperands, odsBuildableType0, globalPtrOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(ldsPtrOperands, odsBuildableType1, ldsPtrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadLDSOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getGlobalPtr();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getLdsPtr();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getSizeAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getOffsetAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getAuxAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("size");
  elidedAttrs.push_back("offset");
  elidedAttrs.push_back("aux");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}

void GlobalLoadLDSOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Write::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> GlobalLoadLDSOp::getAccessedOperands() {
  return {getGlobalPtr(), getLdsPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::GlobalLoadLDSOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::GlobalLoadTr4_B64 definitions
//===----------------------------------------------------------------------===//

namespace detail {

GlobalLoadTr4_B64GenericAdaptorBase::GlobalLoadTr4_B64GenericAdaptorBase(GlobalLoadTr4_B64 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr4_B64GenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr4_B64GenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr4_B64GenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
GlobalLoadTr4_B64Adaptor::GlobalLoadTr4_B64Adaptor(GlobalLoadTr4_B64 op) : GlobalLoadTr4_B64GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult GlobalLoadTr4_B64Adaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.tr4.b64' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.tr4.b64' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.tr4.b64' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadTr4_B64::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute GlobalLoadTr4_B64::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code GlobalLoadTr4_B64::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> GlobalLoadTr4_B64::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void GlobalLoadTr4_B64::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void GlobalLoadTr4_B64::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult GlobalLoadTr4_B64::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadTr4_B64::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadTr4_B64::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr4_B64::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr4_B64::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr4_B64::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void GlobalLoadTr4_B64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  odsState.addTypes(res);
}

GlobalLoadTr4_B64 GlobalLoadTr4_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr4_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr4_B64 GlobalLoadTr4_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), res, ptr, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadTr4_B64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GlobalLoadTr4_B64 GlobalLoadTr4_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr4_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr4_B64 GlobalLoadTr4_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadTr4_B64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<GlobalLoadTr4_B64::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

GlobalLoadTr4_B64 GlobalLoadTr4_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr4_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr4_B64 GlobalLoadTr4_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void GlobalLoadTr4_B64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GlobalLoadTr4_B64 GlobalLoadTr4_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr4_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr4_B64 GlobalLoadTr4_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult GlobalLoadTr4_B64::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps25(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadTr4_B64::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult GlobalLoadTr4_B64::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::Type ptrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ptrTypes(&ptrRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  if (parser.parseType(ptrRawType))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(ptrOperands, ptrTypes, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadTr4_B64::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
   _odsPrinter << getPtr().getType();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void GlobalLoadTr4_B64::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> GlobalLoadTr4_B64::getAccessedOperands() {
  return {getPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::GlobalLoadTr4_B64)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::GlobalLoadTr6_B96 definitions
//===----------------------------------------------------------------------===//

namespace detail {

GlobalLoadTr6_B96GenericAdaptorBase::GlobalLoadTr6_B96GenericAdaptorBase(GlobalLoadTr6_B96 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr6_B96GenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr6_B96GenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr6_B96GenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
GlobalLoadTr6_B96Adaptor::GlobalLoadTr6_B96Adaptor(GlobalLoadTr6_B96 op) : GlobalLoadTr6_B96GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult GlobalLoadTr6_B96Adaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.tr6.b96' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.tr6.b96' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.tr6.b96' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadTr6_B96::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute GlobalLoadTr6_B96::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code GlobalLoadTr6_B96::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> GlobalLoadTr6_B96::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void GlobalLoadTr6_B96::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void GlobalLoadTr6_B96::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult GlobalLoadTr6_B96::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadTr6_B96::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadTr6_B96::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr6_B96::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr6_B96::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr6_B96::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void GlobalLoadTr6_B96::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  odsState.addTypes(res);
}

GlobalLoadTr6_B96 GlobalLoadTr6_B96::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr6_B96>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr6_B96 GlobalLoadTr6_B96::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), res, ptr, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadTr6_B96::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GlobalLoadTr6_B96 GlobalLoadTr6_B96::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr6_B96>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr6_B96 GlobalLoadTr6_B96::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadTr6_B96::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<GlobalLoadTr6_B96::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

GlobalLoadTr6_B96 GlobalLoadTr6_B96::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr6_B96>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr6_B96 GlobalLoadTr6_B96::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void GlobalLoadTr6_B96::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GlobalLoadTr6_B96 GlobalLoadTr6_B96::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr6_B96>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr6_B96 GlobalLoadTr6_B96::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult GlobalLoadTr6_B96::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps25(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadTr6_B96::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult GlobalLoadTr6_B96::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::Type ptrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ptrTypes(&ptrRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  if (parser.parseType(ptrRawType))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(ptrOperands, ptrTypes, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadTr6_B96::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
   _odsPrinter << getPtr().getType();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void GlobalLoadTr6_B96::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> GlobalLoadTr6_B96::getAccessedOperands() {
  return {getPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::GlobalLoadTr6_B96)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::GlobalLoadTr8_B128 definitions
//===----------------------------------------------------------------------===//

namespace detail {

GlobalLoadTr8_B128GenericAdaptorBase::GlobalLoadTr8_B128GenericAdaptorBase(GlobalLoadTr8_B128 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr8_B128GenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr8_B128GenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr8_B128GenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
GlobalLoadTr8_B128Adaptor::GlobalLoadTr8_B128Adaptor(GlobalLoadTr8_B128 op) : GlobalLoadTr8_B128GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult GlobalLoadTr8_B128Adaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.tr.b128' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.tr.b128' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.tr.b128' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadTr8_B128::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute GlobalLoadTr8_B128::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code GlobalLoadTr8_B128::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> GlobalLoadTr8_B128::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void GlobalLoadTr8_B128::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void GlobalLoadTr8_B128::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult GlobalLoadTr8_B128::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadTr8_B128::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadTr8_B128::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr8_B128::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr8_B128::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr8_B128::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void GlobalLoadTr8_B128::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  odsState.addTypes(res);
}

GlobalLoadTr8_B128 GlobalLoadTr8_B128::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr8_B128>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr8_B128 GlobalLoadTr8_B128::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), res, ptr, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadTr8_B128::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GlobalLoadTr8_B128 GlobalLoadTr8_B128::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr8_B128>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr8_B128 GlobalLoadTr8_B128::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadTr8_B128::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<GlobalLoadTr8_B128::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

GlobalLoadTr8_B128 GlobalLoadTr8_B128::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr8_B128>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr8_B128 GlobalLoadTr8_B128::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void GlobalLoadTr8_B128::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GlobalLoadTr8_B128 GlobalLoadTr8_B128::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr8_B128>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr8_B128 GlobalLoadTr8_B128::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult GlobalLoadTr8_B128::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps25(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadTr8_B128::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult GlobalLoadTr8_B128::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::Type ptrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ptrTypes(&ptrRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  if (parser.parseType(ptrRawType))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(ptrOperands, ptrTypes, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadTr8_B128::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
   _odsPrinter << getPtr().getType();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void GlobalLoadTr8_B128::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> GlobalLoadTr8_B128::getAccessedOperands() {
  return {getPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::GlobalLoadTr8_B128)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::GlobalLoadTr8_B64 definitions
//===----------------------------------------------------------------------===//

namespace detail {

GlobalLoadTr8_B64GenericAdaptorBase::GlobalLoadTr8_B64GenericAdaptorBase(GlobalLoadTr8_B64 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr8_B64GenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr8_B64GenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr8_B64GenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
GlobalLoadTr8_B64Adaptor::GlobalLoadTr8_B64Adaptor(GlobalLoadTr8_B64 op) : GlobalLoadTr8_B64GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult GlobalLoadTr8_B64Adaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.tr.b64' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.tr.b64' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.global.load.tr.b64' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadTr8_B64::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute GlobalLoadTr8_B64::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code GlobalLoadTr8_B64::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> GlobalLoadTr8_B64::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void GlobalLoadTr8_B64::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void GlobalLoadTr8_B64::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult GlobalLoadTr8_B64::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadTr8_B64::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadTr8_B64::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr8_B64::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr8_B64::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > GlobalLoadTr8_B64::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void GlobalLoadTr8_B64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  odsState.addTypes(res);
}

GlobalLoadTr8_B64 GlobalLoadTr8_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr8_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr8_B64 GlobalLoadTr8_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), res, ptr, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadTr8_B64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GlobalLoadTr8_B64 GlobalLoadTr8_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr8_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr8_B64 GlobalLoadTr8_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
}

void GlobalLoadTr8_B64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<GlobalLoadTr8_B64::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

GlobalLoadTr8_B64 GlobalLoadTr8_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr8_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr8_B64 GlobalLoadTr8_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void GlobalLoadTr8_B64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GlobalLoadTr8_B64 GlobalLoadTr8_B64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<GlobalLoadTr8_B64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GlobalLoadTr8_B64 GlobalLoadTr8_B64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult GlobalLoadTr8_B64::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps25(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult GlobalLoadTr8_B64::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult GlobalLoadTr8_B64::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::Type ptrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ptrTypes(&ptrRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  if (parser.parseType(ptrRawType))
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(ptrOperands, ptrTypes, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void GlobalLoadTr8_B64::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
   _odsPrinter << getPtr().getType();
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void GlobalLoadTr8_B64::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> GlobalLoadTr8_B64::getAccessedOperands() {
  return {getPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::GlobalLoadTr8_B64)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::GridDimXOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

GridDimXOpGenericAdaptorBase::GridDimXOpGenericAdaptorBase(GridDimXOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> GridDimXOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
GridDimXOpAdaptor::GridDimXOpAdaptor(GridDimXOp op) : GridDimXOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult GridDimXOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.grid.dim.x' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult GridDimXOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute GridDimXOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code GridDimXOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> GridDimXOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void GridDimXOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void GridDimXOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult GridDimXOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult GridDimXOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void GridDimXOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> GridDimXOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void GridDimXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

GridDimXOp GridDimXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<GridDimXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimXOp GridDimXOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void GridDimXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

GridDimXOp GridDimXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<GridDimXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimXOp GridDimXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void GridDimXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GridDimXOp GridDimXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<GridDimXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimXOp GridDimXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void GridDimXOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<GridDimXOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

GridDimXOp GridDimXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<GridDimXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimXOp GridDimXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void GridDimXOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GridDimXOp GridDimXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<GridDimXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimXOp GridDimXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult GridDimXOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult GridDimXOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult GridDimXOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<GridDimXOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void GridDimXOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void GridDimXOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::GridDimXOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::GridDimYOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

GridDimYOpGenericAdaptorBase::GridDimYOpGenericAdaptorBase(GridDimYOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> GridDimYOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
GridDimYOpAdaptor::GridDimYOpAdaptor(GridDimYOp op) : GridDimYOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult GridDimYOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.grid.dim.y' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult GridDimYOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute GridDimYOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code GridDimYOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> GridDimYOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void GridDimYOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void GridDimYOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult GridDimYOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult GridDimYOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void GridDimYOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> GridDimYOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void GridDimYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

GridDimYOp GridDimYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<GridDimYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimYOp GridDimYOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void GridDimYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

GridDimYOp GridDimYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<GridDimYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimYOp GridDimYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void GridDimYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GridDimYOp GridDimYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<GridDimYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimYOp GridDimYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void GridDimYOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<GridDimYOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

GridDimYOp GridDimYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<GridDimYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimYOp GridDimYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void GridDimYOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GridDimYOp GridDimYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<GridDimYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimYOp GridDimYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult GridDimYOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult GridDimYOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult GridDimYOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<GridDimYOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void GridDimYOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void GridDimYOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::GridDimYOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::GridDimZOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

GridDimZOpGenericAdaptorBase::GridDimZOpGenericAdaptorBase(GridDimZOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> GridDimZOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
GridDimZOpAdaptor::GridDimZOpAdaptor(GridDimZOp op) : GridDimZOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult GridDimZOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.grid.dim.z' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult GridDimZOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute GridDimZOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code GridDimZOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> GridDimZOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void GridDimZOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void GridDimZOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult GridDimZOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult GridDimZOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void GridDimZOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> GridDimZOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void GridDimZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

GridDimZOp GridDimZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<GridDimZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimZOp GridDimZOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void GridDimZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

GridDimZOp GridDimZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<GridDimZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimZOp GridDimZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void GridDimZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

GridDimZOp GridDimZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<GridDimZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimZOp GridDimZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void GridDimZOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<GridDimZOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

GridDimZOp GridDimZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<GridDimZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimZOp GridDimZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void GridDimZOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

GridDimZOp GridDimZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<GridDimZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

GridDimZOp GridDimZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult GridDimZOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult GridDimZOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult GridDimZOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<GridDimZOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void GridDimZOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void GridDimZOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::GridDimZOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::IglpOpt definitions
//===----------------------------------------------------------------------===//

namespace detail {

IglpOptGenericAdaptorBase::IglpOptGenericAdaptorBase(IglpOpt op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t IglpOptGenericAdaptorBase::getVariant() {
  auto attr = getVariantAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
IglpOptAdaptor::IglpOptAdaptor(IglpOpt op) : IglpOptGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult IglpOptAdaptor::verify(::mlir::Location loc) {
  auto tblgen_variant = getProperties().variant; (void)tblgen_variant;
  if (!tblgen_variant) return emitError(loc, "'rocdl.iglp.opt' op requires attribute 'variant'");

  if (tblgen_variant && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_variant))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_variant).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.iglp.opt' op attribute 'variant' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult IglpOpt::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.variant;
       auto attr = dict.get("variant");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `variant` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute IglpOpt::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.variant;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("variant",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code IglpOpt::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.variant.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> IglpOpt::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "variant")
      return prop.variant;
  return std::nullopt;
}

void IglpOpt::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "variant") {
       prop.variant = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.variant)>>(value);
       return;
    }
}

void IglpOpt::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.variant) attrs.append("variant", prop.variant);
}

::llvm::LogicalResult IglpOpt::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getVariantAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "variant", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult IglpOpt::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.variant)))
    return ::mlir::failure();
  return ::mlir::success();
}

void IglpOpt::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.variant);
}

uint32_t IglpOpt::getVariant() {
  auto attr = getVariantAttr();
  return attr.getValue().getZExtValue();
}

void IglpOpt::setVariant(uint32_t attrValue) {
  getProperties().variant = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void IglpOpt::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr variant) {
  odsState.getOrAddProperties<Properties>().variant = variant;
}

IglpOpt IglpOpt::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr variant) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, variant);
  auto __res__ = ::llvm::dyn_cast<IglpOpt>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

IglpOpt IglpOpt::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr variant) {
  return create(builder, builder.getLoc(), variant);
}

void IglpOpt::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr variant) {
  odsState.getOrAddProperties<Properties>().variant = variant;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

IglpOpt IglpOpt::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr variant) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, variant);
  auto __res__ = ::llvm::dyn_cast<IglpOpt>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

IglpOpt IglpOpt::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr variant) {
  return create(builder, builder.getLoc(), resultTypes, variant);
}

void IglpOpt::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t variant) {
  odsState.getOrAddProperties<Properties>().variant = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), variant);
}

IglpOpt IglpOpt::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t variant) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, variant);
  auto __res__ = ::llvm::dyn_cast<IglpOpt>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

IglpOpt IglpOpt::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t variant) {
  return create(builder, builder.getLoc(), variant);
}

void IglpOpt::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t variant) {
  odsState.getOrAddProperties<Properties>().variant = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), variant);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

IglpOpt IglpOpt::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t variant) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, variant);
  auto __res__ = ::llvm::dyn_cast<IglpOpt>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

IglpOpt IglpOpt::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t variant) {
  return create(builder, builder.getLoc(), resultTypes, variant);
}

void IglpOpt::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<IglpOpt::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

IglpOpt IglpOpt::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<IglpOpt>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

IglpOpt IglpOpt::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void IglpOpt::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

IglpOpt IglpOpt::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<IglpOpt>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

IglpOpt IglpOpt::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult IglpOpt::verifyInvariantsImpl() {
  auto tblgen_variant = getProperties().variant; (void)tblgen_variant;
  if (!tblgen_variant) return emitOpError("requires attribute 'variant'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_variant, "variant")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult IglpOpt::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult IglpOpt::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr variantAttr;

  if (parser.parseCustomAttributeWithFallback(variantAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (variantAttr) result.getOrAddProperties<IglpOpt::Properties>().variant = variantAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void IglpOpt::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getVariantAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("variant");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::IglpOpt)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::LoadToLDSOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

LoadToLDSOpGenericAdaptorBase::LoadToLDSOpGenericAdaptorBase(LoadToLDSOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t LoadToLDSOpGenericAdaptorBase::getSize() {
  auto attr = getSizeAttr();
  return attr.getValue().getZExtValue();
}

uint32_t LoadToLDSOpGenericAdaptorBase::getOffset() {
  auto attr = getOffsetAttr();
  return attr.getValue().getZExtValue();
}

uint32_t LoadToLDSOpGenericAdaptorBase::getAux() {
  auto attr = getAuxAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > LoadToLDSOpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > LoadToLDSOpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > LoadToLDSOpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
LoadToLDSOpAdaptor::LoadToLDSOpAdaptor(LoadToLDSOp op) : LoadToLDSOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult LoadToLDSOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_aux = getProperties().aux; (void)tblgen_aux;
  if (!tblgen_aux) return emitError(loc, "'rocdl.load.to.lds' op requires attribute 'aux'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_offset = getProperties().offset; (void)tblgen_offset;
  if (!tblgen_offset) return emitError(loc, "'rocdl.load.to.lds' op requires attribute 'offset'");
  auto tblgen_size = getProperties().size; (void)tblgen_size;
  if (!tblgen_size) return emitError(loc, "'rocdl.load.to.lds' op requires attribute 'size'");
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_size && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_size))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_size).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.load.to.lds' op attribute 'size' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_offset && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_offset))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_offset).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.load.to.lds' op attribute 'offset' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_aux && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_aux))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_aux).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.load.to.lds' op attribute 'aux' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.load.to.lds' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.load.to.lds' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.load.to.lds' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult LoadToLDSOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.aux;
       auto attr = dict.get("aux");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `aux` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.offset;
       auto attr = dict.get("offset");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `offset` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.size;
       auto attr = dict.get("size");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `size` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute LoadToLDSOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.aux;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("aux",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.offset;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("offset",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.size;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("size",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code LoadToLDSOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.aux.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.offset.getAsOpaquePointer()), 
    llvm::hash_value(prop.size.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> LoadToLDSOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "aux")
      return prop.aux;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "offset")
      return prop.offset;

    if (name == "size")
      return prop.size;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void LoadToLDSOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "aux") {
       prop.aux = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.aux)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "offset") {
       prop.offset = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.offset)>>(value);
       return;
    }

    if (name == "size") {
       prop.size = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.size)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void LoadToLDSOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.aux) attrs.append("aux", prop.aux);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.offset) attrs.append("offset", prop.offset);

    if (prop.size) attrs.append("size", prop.size);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult LoadToLDSOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getAuxAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "aux", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getOffsetAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "offset", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSizeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "size", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult LoadToLDSOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.aux)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.offset)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.size)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void LoadToLDSOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);
  writer.writeAttribute(prop.aux);

  writer.writeOptionalAttribute(prop.noalias_scopes);
  writer.writeAttribute(prop.offset);
  writer.writeAttribute(prop.size);

  writer.writeOptionalAttribute(prop.tbaa);
}

uint32_t LoadToLDSOp::getSize() {
  auto attr = getSizeAttr();
  return attr.getValue().getZExtValue();
}

uint32_t LoadToLDSOp::getOffset() {
  auto attr = getOffsetAttr();
  return attr.getValue().getZExtValue();
}

uint32_t LoadToLDSOp::getAux() {
  auto attr = getAuxAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > LoadToLDSOp::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > LoadToLDSOp::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > LoadToLDSOp::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void LoadToLDSOp::setSize(uint32_t attrValue) {
  getProperties().size = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void LoadToLDSOp::setOffset(uint32_t attrValue) {
  getProperties().offset = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void LoadToLDSOp::setAux(uint32_t attrValue) {
  getProperties().aux = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void LoadToLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr size, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().size = size;
  odsState.getOrAddProperties<Properties>().offset = offset;
  odsState.getOrAddProperties<Properties>().aux = aux;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

LoadToLDSOp LoadToLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr size, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<LoadToLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

LoadToLDSOp LoadToLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr size, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void LoadToLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr size, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().size = size;
  odsState.getOrAddProperties<Properties>().offset = offset;
  odsState.getOrAddProperties<Properties>().aux = aux;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

LoadToLDSOp LoadToLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr size, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<LoadToLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

LoadToLDSOp LoadToLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, ::mlir::IntegerAttr size, ::mlir::IntegerAttr offset, ::mlir::IntegerAttr aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void LoadToLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t size, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().size = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), size);
  odsState.getOrAddProperties<Properties>().offset = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), offset);
  odsState.getOrAddProperties<Properties>().aux = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

LoadToLDSOp LoadToLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t size, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<LoadToLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

LoadToLDSOp LoadToLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t size, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void LoadToLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t size, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(globalPtr);
  odsState.addOperands(ldsPtr);
  odsState.getOrAddProperties<Properties>().size = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), size);
  odsState.getOrAddProperties<Properties>().offset = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), offset);
  odsState.getOrAddProperties<Properties>().aux = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

LoadToLDSOp LoadToLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t size, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<LoadToLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

LoadToLDSOp LoadToLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value globalPtr, ::mlir::Value ldsPtr, uint32_t size, uint32_t offset, uint32_t aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, globalPtr, ldsPtr, size, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void LoadToLDSOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<LoadToLDSOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

LoadToLDSOp LoadToLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<LoadToLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

LoadToLDSOp LoadToLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void LoadToLDSOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

LoadToLDSOp LoadToLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<LoadToLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

LoadToLDSOp LoadToLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult LoadToLDSOp::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_aux = getProperties().aux; (void)tblgen_aux;
  if (!tblgen_aux) return emitOpError("requires attribute 'aux'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_offset = getProperties().offset; (void)tblgen_offset;
  if (!tblgen_offset) return emitOpError("requires attribute 'offset'");
  auto tblgen_size = getProperties().size; (void)tblgen_size;
  if (!tblgen_size) return emitOpError("requires attribute 'size'");
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_size, "size")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_offset, "offset")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_aux, "aux")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps26(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult LoadToLDSOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult LoadToLDSOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand globalPtrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> globalPtrOperands(&globalPtrRawOperand, 1);  ::llvm::SMLoc globalPtrOperandsLoc;
  (void)globalPtrOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand ldsPtrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ldsPtrOperands(&ldsPtrRawOperand, 1);  ::llvm::SMLoc ldsPtrOperandsLoc;
  (void)ldsPtrOperandsLoc;
  ::mlir::IntegerAttr sizeAttr;
  ::mlir::IntegerAttr offsetAttr;
  ::mlir::IntegerAttr auxAttr;
  ::mlir::Type globalPtrRawType{};
  ::llvm::ArrayRef<::mlir::Type> globalPtrTypes(&globalPtrRawType, 1);

  globalPtrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(globalPtrRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  ldsPtrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ldsPtrRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(sizeAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (sizeAttr) result.getOrAddProperties<LoadToLDSOp::Properties>().size = sizeAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(offsetAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (offsetAttr) result.getOrAddProperties<LoadToLDSOp::Properties>().offset = offsetAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(auxAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (auxAttr) result.getOrAddProperties<LoadToLDSOp::Properties>().aux = auxAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    globalPtrRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(3);
  if (parser.resolveOperands(globalPtrOperands, globalPtrTypes, globalPtrOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(ldsPtrOperands, odsBuildableType0, ldsPtrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void LoadToLDSOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getGlobalPtr();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getLdsPtr();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getSizeAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getOffsetAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getAuxAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("size");
  elidedAttrs.push_back("offset");
  elidedAttrs.push_back("aux");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getGlobalPtr().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void LoadToLDSOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Write::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> LoadToLDSOp::getAccessedOperands() {
  return {getGlobalPtr(), getLdsPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::LoadToLDSOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::MakeBufferRsrcOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

MakeBufferRsrcOpGenericAdaptorBase::MakeBufferRsrcOpGenericAdaptorBase(MakeBufferRsrcOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
MakeBufferRsrcOpAdaptor::MakeBufferRsrcOpAdaptor(MakeBufferRsrcOp op) : MakeBufferRsrcOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult MakeBufferRsrcOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult MakeBufferRsrcOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute MakeBufferRsrcOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code MakeBufferRsrcOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> MakeBufferRsrcOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void MakeBufferRsrcOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void MakeBufferRsrcOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult MakeBufferRsrcOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void MakeBufferRsrcOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value base, ::mlir::Value stride, ::mlir::Value numRecords, ::mlir::Value flags) {
  odsState.addOperands(base);
  odsState.addOperands(stride);
  odsState.addOperands(numRecords);
  odsState.addOperands(flags);
  odsState.addTypes(res);
}

MakeBufferRsrcOp MakeBufferRsrcOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value base, ::mlir::Value stride, ::mlir::Value numRecords, ::mlir::Value flags) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, base, stride, numRecords, flags);
  auto __res__ = ::llvm::dyn_cast<MakeBufferRsrcOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

MakeBufferRsrcOp MakeBufferRsrcOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value base, ::mlir::Value stride, ::mlir::Value numRecords, ::mlir::Value flags) {
  return create(builder, builder.getLoc(), res, base, stride, numRecords, flags);
}

void MakeBufferRsrcOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value stride, ::mlir::Value numRecords, ::mlir::Value flags) {
  odsState.addOperands(base);
  odsState.addOperands(stride);
  odsState.addOperands(numRecords);
  odsState.addOperands(flags);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

MakeBufferRsrcOp MakeBufferRsrcOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value stride, ::mlir::Value numRecords, ::mlir::Value flags) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, base, stride, numRecords, flags);
  auto __res__ = ::llvm::dyn_cast<MakeBufferRsrcOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

MakeBufferRsrcOp MakeBufferRsrcOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value stride, ::mlir::Value numRecords, ::mlir::Value flags) {
  return create(builder, builder.getLoc(), resultTypes, base, stride, numRecords, flags);
}

void MakeBufferRsrcOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

MakeBufferRsrcOp MakeBufferRsrcOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<MakeBufferRsrcOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

MakeBufferRsrcOp MakeBufferRsrcOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void MakeBufferRsrcOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

MakeBufferRsrcOp MakeBufferRsrcOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<MakeBufferRsrcOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

MakeBufferRsrcOp MakeBufferRsrcOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult MakeBufferRsrcOp::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps26(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps27(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps28(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps26(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult MakeBufferRsrcOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult MakeBufferRsrcOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
  ::mlir::Type baseRawType{};
  ::llvm::ArrayRef<::mlir::Type> baseTypes(&baseRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(allOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    baseRawType = type;
  }
  if (parser.parseKeyword("to"))
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(16);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(64);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(allOperands, ::llvm::concat<const ::mlir::Type>(::llvm::ArrayRef<::mlir::Type>(baseTypes), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType0), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType2)), allOperandLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void MakeBufferRsrcOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getOperation()->getOperands();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getBase().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ' ' << "to";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void MakeBufferRsrcOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::MakeBufferRsrcOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::MbcntHiOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

MbcntHiOpGenericAdaptorBase::MbcntHiOpGenericAdaptorBase(MbcntHiOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > MbcntHiOpGenericAdaptorBase::getArgAttrs() {
  auto attr = getArgAttrsAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > MbcntHiOpGenericAdaptorBase::getResAttrs() {
  auto attr = getResAttrsAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
MbcntHiOpAdaptor::MbcntHiOpAdaptor(MbcntHiOp op) : MbcntHiOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult MbcntHiOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
  auto tblgen_res_attrs = getProperties().res_attrs; (void)tblgen_res_attrs;

  if (tblgen_arg_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_arg_attrs))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_arg_attrs), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
    return emitError(loc, "'rocdl.mbcnt.hi' op attribute 'arg_attrs' failed to satisfy constraint: Array of dictionary attributes");

  if (tblgen_res_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_res_attrs))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_res_attrs), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
    return emitError(loc, "'rocdl.mbcnt.hi' op attribute 'res_attrs' failed to satisfy constraint: Array of dictionary attributes");
  return ::mlir::success();
}

::llvm::LogicalResult MbcntHiOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.arg_attrs;
       auto attr = dict.get("arg_attrs");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `arg_attrs` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.res_attrs;
       auto attr = dict.get("res_attrs");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `res_attrs` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute MbcntHiOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.arg_attrs;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("arg_attrs",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.res_attrs;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("res_attrs",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code MbcntHiOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.arg_attrs.getAsOpaquePointer()), 
    llvm::hash_value(prop.res_attrs.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> MbcntHiOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "arg_attrs")
      return prop.arg_attrs;

    if (name == "res_attrs")
      return prop.res_attrs;
  return std::nullopt;
}

void MbcntHiOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "arg_attrs") {
       prop.arg_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.arg_attrs)>>(value);
       return;
    }

    if (name == "res_attrs") {
       prop.res_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.res_attrs)>>(value);
       return;
    }
}

void MbcntHiOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.arg_attrs) attrs.append("arg_attrs", prop.arg_attrs);

    if (prop.res_attrs) attrs.append("res_attrs", prop.res_attrs);
}

::llvm::LogicalResult MbcntHiOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getArgAttrsAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps7(attr, "arg_attrs", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getResAttrsAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps7(attr, "res_attrs", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult MbcntHiOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.arg_attrs)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.res_attrs)))
    return ::mlir::failure();
  return ::mlir::success();
}

void MbcntHiOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.arg_attrs);

  writer.writeOptionalAttribute(prop.res_attrs);
}

::std::optional< ::mlir::ArrayAttr > MbcntHiOp::getArgAttrs() {
  auto attr = getArgAttrsAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > MbcntHiOp::getResAttrs() {
  auto attr = getResAttrsAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void MbcntHiOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in0, ::mlir::Value in1, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
  odsState.addOperands(in0);
  odsState.addOperands(in1);
  if (arg_attrs) {
    odsState.getOrAddProperties<Properties>().arg_attrs = arg_attrs;
  }
  if (res_attrs) {
    odsState.getOrAddProperties<Properties>().res_attrs = res_attrs;
  }
  odsState.addTypes(res);
}

MbcntHiOp MbcntHiOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in0, ::mlir::Value in1, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, in0, in1, arg_attrs, res_attrs);
  auto __res__ = ::llvm::dyn_cast<MbcntHiOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

MbcntHiOp MbcntHiOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in0, ::mlir::Value in1, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
  return create(builder, builder.getLoc(), res, in0, in1, arg_attrs, res_attrs);
}

void MbcntHiOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in0, ::mlir::Value in1, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
  odsState.addOperands(in0);
  odsState.addOperands(in1);
  if (arg_attrs) {
    odsState.getOrAddProperties<Properties>().arg_attrs = arg_attrs;
  }
  if (res_attrs) {
    odsState.getOrAddProperties<Properties>().res_attrs = res_attrs;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

MbcntHiOp MbcntHiOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in0, ::mlir::Value in1, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, in0, in1, arg_attrs, res_attrs);
  auto __res__ = ::llvm::dyn_cast<MbcntHiOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

MbcntHiOp MbcntHiOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in0, ::mlir::Value in1, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
  return create(builder, builder.getLoc(), resultTypes, in0, in1, arg_attrs, res_attrs);
}

void MbcntHiOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<MbcntHiOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

MbcntHiOp MbcntHiOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<MbcntHiOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

MbcntHiOp MbcntHiOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void MbcntHiOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

MbcntHiOp MbcntHiOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<MbcntHiOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

MbcntHiOp MbcntHiOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult MbcntHiOp::verifyInvariantsImpl() {
  auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
  auto tblgen_res_attrs = getProperties().res_attrs; (void)tblgen_res_attrs;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps7(*this, tblgen_arg_attrs, "arg_attrs")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps7(*this, tblgen_res_attrs, "res_attrs")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult MbcntHiOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult MbcntHiOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand in0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> in0Operands(&in0RawOperand, 1);  ::llvm::SMLoc in0OperandsLoc;
  (void)in0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand in1RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> in1Operands(&in1RawOperand, 1);  ::llvm::SMLoc in1OperandsLoc;
  (void)in1OperandsLoc;
  ::mlir::Type in0RawType{};
  ::llvm::ArrayRef<::mlir::Type> in0Types(&in0RawType, 1);
  ::mlir::Type in1RawType{};
  ::llvm::ArrayRef<::mlir::Type> in1Types(&in1RawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  in0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(in0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  in1OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(in1RawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();
  if (parser.parseLParen())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    in0RawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    in1RawType = type;
  }
  if (parser.parseRParen())
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(in0Operands, in0Types, in0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(in1Operands, in1Types, in1OperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void MbcntHiOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getIn0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getIn1();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ' << "(";
  {
    auto type = getIn0().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getIn1().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ")";
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void MbcntHiOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::MbcntHiOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::MbcntLoOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

MbcntLoOpGenericAdaptorBase::MbcntLoOpGenericAdaptorBase(MbcntLoOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > MbcntLoOpGenericAdaptorBase::getArgAttrs() {
  auto attr = getArgAttrsAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > MbcntLoOpGenericAdaptorBase::getResAttrs() {
  auto attr = getResAttrsAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
MbcntLoOpAdaptor::MbcntLoOpAdaptor(MbcntLoOp op) : MbcntLoOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult MbcntLoOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
  auto tblgen_res_attrs = getProperties().res_attrs; (void)tblgen_res_attrs;

  if (tblgen_arg_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_arg_attrs))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_arg_attrs), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
    return emitError(loc, "'rocdl.mbcnt.lo' op attribute 'arg_attrs' failed to satisfy constraint: Array of dictionary attributes");

  if (tblgen_res_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_res_attrs))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_res_attrs), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
    return emitError(loc, "'rocdl.mbcnt.lo' op attribute 'res_attrs' failed to satisfy constraint: Array of dictionary attributes");
  return ::mlir::success();
}

::llvm::LogicalResult MbcntLoOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.arg_attrs;
       auto attr = dict.get("arg_attrs");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `arg_attrs` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.res_attrs;
       auto attr = dict.get("res_attrs");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `res_attrs` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute MbcntLoOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.arg_attrs;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("arg_attrs",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.res_attrs;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("res_attrs",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code MbcntLoOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.arg_attrs.getAsOpaquePointer()), 
    llvm::hash_value(prop.res_attrs.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> MbcntLoOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "arg_attrs")
      return prop.arg_attrs;

    if (name == "res_attrs")
      return prop.res_attrs;
  return std::nullopt;
}

void MbcntLoOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "arg_attrs") {
       prop.arg_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.arg_attrs)>>(value);
       return;
    }

    if (name == "res_attrs") {
       prop.res_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.res_attrs)>>(value);
       return;
    }
}

void MbcntLoOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.arg_attrs) attrs.append("arg_attrs", prop.arg_attrs);

    if (prop.res_attrs) attrs.append("res_attrs", prop.res_attrs);
}

::llvm::LogicalResult MbcntLoOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getArgAttrsAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps7(attr, "arg_attrs", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getResAttrsAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps7(attr, "res_attrs", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult MbcntLoOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.arg_attrs)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.res_attrs)))
    return ::mlir::failure();
  return ::mlir::success();
}

void MbcntLoOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.arg_attrs);

  writer.writeOptionalAttribute(prop.res_attrs);
}

::std::optional< ::mlir::ArrayAttr > MbcntLoOp::getArgAttrs() {
  auto attr = getArgAttrsAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > MbcntLoOp::getResAttrs() {
  auto attr = getResAttrsAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void MbcntLoOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in0, ::mlir::Value in1, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
  odsState.addOperands(in0);
  odsState.addOperands(in1);
  if (arg_attrs) {
    odsState.getOrAddProperties<Properties>().arg_attrs = arg_attrs;
  }
  if (res_attrs) {
    odsState.getOrAddProperties<Properties>().res_attrs = res_attrs;
  }
  odsState.addTypes(res);
}

MbcntLoOp MbcntLoOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in0, ::mlir::Value in1, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, in0, in1, arg_attrs, res_attrs);
  auto __res__ = ::llvm::dyn_cast<MbcntLoOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

MbcntLoOp MbcntLoOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in0, ::mlir::Value in1, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
  return create(builder, builder.getLoc(), res, in0, in1, arg_attrs, res_attrs);
}

void MbcntLoOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in0, ::mlir::Value in1, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
  odsState.addOperands(in0);
  odsState.addOperands(in1);
  if (arg_attrs) {
    odsState.getOrAddProperties<Properties>().arg_attrs = arg_attrs;
  }
  if (res_attrs) {
    odsState.getOrAddProperties<Properties>().res_attrs = res_attrs;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

MbcntLoOp MbcntLoOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in0, ::mlir::Value in1, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, in0, in1, arg_attrs, res_attrs);
  auto __res__ = ::llvm::dyn_cast<MbcntLoOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

MbcntLoOp MbcntLoOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in0, ::mlir::Value in1, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
  return create(builder, builder.getLoc(), resultTypes, in0, in1, arg_attrs, res_attrs);
}

void MbcntLoOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<MbcntLoOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

MbcntLoOp MbcntLoOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<MbcntLoOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

MbcntLoOp MbcntLoOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void MbcntLoOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

MbcntLoOp MbcntLoOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<MbcntLoOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

MbcntLoOp MbcntLoOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult MbcntLoOp::verifyInvariantsImpl() {
  auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
  auto tblgen_res_attrs = getProperties().res_attrs; (void)tblgen_res_attrs;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps7(*this, tblgen_arg_attrs, "arg_attrs")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps7(*this, tblgen_res_attrs, "res_attrs")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult MbcntLoOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult MbcntLoOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand in0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> in0Operands(&in0RawOperand, 1);  ::llvm::SMLoc in0OperandsLoc;
  (void)in0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand in1RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> in1Operands(&in1RawOperand, 1);  ::llvm::SMLoc in1OperandsLoc;
  (void)in1OperandsLoc;
  ::mlir::Type in0RawType{};
  ::llvm::ArrayRef<::mlir::Type> in0Types(&in0RawType, 1);
  ::mlir::Type in1RawType{};
  ::llvm::ArrayRef<::mlir::Type> in1Types(&in1RawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  in0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(in0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  in1OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(in1RawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();
  if (parser.parseLParen())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    in0RawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    in1RawType = type;
  }
  if (parser.parseRParen())
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(in0Operands, in0Types, in0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(in1Operands, in1Types, in1OperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void MbcntLoOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getIn0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getIn1();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ' << "(";
  {
    auto type = getIn0().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getIn1().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ")";
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void MbcntLoOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::MbcntLoOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::Permlane16SwapOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

Permlane16SwapOpGenericAdaptorBase::Permlane16SwapOpGenericAdaptorBase(Permlane16SwapOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool Permlane16SwapOpGenericAdaptorBase::getFi() {
  auto attr = getFiAttr();
  return attr.getValue().getZExtValue();
}

bool Permlane16SwapOpGenericAdaptorBase::getBoundControl() {
  auto attr = getBoundControlAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
Permlane16SwapOpAdaptor::Permlane16SwapOpAdaptor(Permlane16SwapOp op) : Permlane16SwapOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult Permlane16SwapOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_boundControl = getProperties().boundControl; (void)tblgen_boundControl;
  if (!tblgen_boundControl) return emitError(loc, "'rocdl.permlane16.swap' op requires attribute 'boundControl'");
  auto tblgen_fi = getProperties().fi; (void)tblgen_fi;
  if (!tblgen_fi) return emitError(loc, "'rocdl.permlane16.swap' op requires attribute 'fi'");

  if (tblgen_fi && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fi))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fi).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.permlane16.swap' op attribute 'fi' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_boundControl && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_boundControl))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_boundControl).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.permlane16.swap' op attribute 'boundControl' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult Permlane16SwapOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.boundControl;
       auto attr = dict.get("boundControl");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `boundControl` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.fi;
       auto attr = dict.get("fi");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fi` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute Permlane16SwapOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.boundControl;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("boundControl",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.fi;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fi",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code Permlane16SwapOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.boundControl.getAsOpaquePointer()), 
    llvm::hash_value(prop.fi.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> Permlane16SwapOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "boundControl")
      return prop.boundControl;

    if (name == "fi")
      return prop.fi;
  return std::nullopt;
}

void Permlane16SwapOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "boundControl") {
       prop.boundControl = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.boundControl)>>(value);
       return;
    }

    if (name == "fi") {
       prop.fi = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fi)>>(value);
       return;
    }
}

void Permlane16SwapOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.boundControl) attrs.append("boundControl", prop.boundControl);

    if (prop.fi) attrs.append("fi", prop.fi);
}

::llvm::LogicalResult Permlane16SwapOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getBoundControlAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "boundControl", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getFiAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "fi", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult Permlane16SwapOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.boundControl)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.fi)))
    return ::mlir::failure();
  return ::mlir::success();
}

void Permlane16SwapOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.boundControl);
  writer.writeAttribute(prop.fi);
}

bool Permlane16SwapOp::getFi() {
  auto attr = getFiAttr();
  return attr.getValue().getZExtValue();
}

bool Permlane16SwapOp::getBoundControl() {
  auto attr = getBoundControlAttr();
  return attr.getValue().getZExtValue();
}

void Permlane16SwapOp::setFi(bool attrValue) {
  getProperties().fi = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void Permlane16SwapOp::setBoundControl(bool attrValue) {
  getProperties().boundControl = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void Permlane16SwapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  odsState.addOperands(old);
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().fi = fi;
  odsState.getOrAddProperties<Properties>().boundControl = boundControl;
  odsState.addTypes(res);
}

Permlane16SwapOp Permlane16SwapOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, old, src, fi, boundControl);
  auto __res__ = ::llvm::dyn_cast<Permlane16SwapOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

Permlane16SwapOp Permlane16SwapOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  return create(builder, builder.getLoc(), res, old, src, fi, boundControl);
}

void Permlane16SwapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  odsState.addOperands(old);
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().fi = fi;
  odsState.getOrAddProperties<Properties>().boundControl = boundControl;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

Permlane16SwapOp Permlane16SwapOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, old, src, fi, boundControl);
  auto __res__ = ::llvm::dyn_cast<Permlane16SwapOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

Permlane16SwapOp Permlane16SwapOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  return create(builder, builder.getLoc(), resultTypes, old, src, fi, boundControl);
}

void Permlane16SwapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, bool fi, bool boundControl) {
  odsState.addOperands(old);
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().fi = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), fi);
  odsState.getOrAddProperties<Properties>().boundControl = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), boundControl);
  odsState.addTypes(res);
}

Permlane16SwapOp Permlane16SwapOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, bool fi, bool boundControl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, old, src, fi, boundControl);
  auto __res__ = ::llvm::dyn_cast<Permlane16SwapOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

Permlane16SwapOp Permlane16SwapOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, bool fi, bool boundControl) {
  return create(builder, builder.getLoc(), res, old, src, fi, boundControl);
}

void Permlane16SwapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, bool fi, bool boundControl) {
  odsState.addOperands(old);
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().fi = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), fi);
  odsState.getOrAddProperties<Properties>().boundControl = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), boundControl);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

Permlane16SwapOp Permlane16SwapOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, bool fi, bool boundControl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, old, src, fi, boundControl);
  auto __res__ = ::llvm::dyn_cast<Permlane16SwapOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

Permlane16SwapOp Permlane16SwapOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, bool fi, bool boundControl) {
  return create(builder, builder.getLoc(), resultTypes, old, src, fi, boundControl);
}

void Permlane16SwapOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<Permlane16SwapOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

Permlane16SwapOp Permlane16SwapOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<Permlane16SwapOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

Permlane16SwapOp Permlane16SwapOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void Permlane16SwapOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

Permlane16SwapOp Permlane16SwapOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<Permlane16SwapOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

Permlane16SwapOp Permlane16SwapOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult Permlane16SwapOp::verifyInvariantsImpl() {
  auto tblgen_boundControl = getProperties().boundControl; (void)tblgen_boundControl;
  if (!tblgen_boundControl) return emitOpError("requires attribute 'boundControl'");
  auto tblgen_fi = getProperties().fi; (void)tblgen_fi;
  if (!tblgen_fi) return emitOpError("requires attribute 'fi'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_fi, "fi")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_boundControl, "boundControl")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps29(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult Permlane16SwapOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult Permlane16SwapOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand oldRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldOperands(&oldRawOperand, 1);  ::llvm::SMLoc oldOperandsLoc;
  (void)oldOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr fiAttr;
  ::mlir::IntegerAttr boundControlAttr;
  ::mlir::Type oldRawType{};
  ::llvm::ArrayRef<::mlir::Type> oldTypes(&oldRawType, 1);
  ::mlir::Type srcRawType{};
  ::llvm::ArrayRef<::mlir::Type> srcTypes(&srcRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  oldOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(fiAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (fiAttr) result.getOrAddProperties<Permlane16SwapOp::Properties>().fi = fiAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(boundControlAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (boundControlAttr) result.getOrAddProperties<Permlane16SwapOp::Properties>().boundControl = boundControlAttr;
  if (parser.parseColon())
    return ::mlir::failure();
  if (parser.parseLParen())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    oldRawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    srcRawType = type;
  }
  if (parser.parseRParen())
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMStructType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldOperands, oldTypes, oldOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcOperands, srcTypes, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void Permlane16SwapOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("fi");
  elidedAttrs.push_back("boundControl");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getOld();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getFiAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getBoundControlAttr());
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ' << "(";
  {
    auto type = getOld().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getSrc().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ")";
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMStructType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::Permlane16SwapOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::Permlane32SwapOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

Permlane32SwapOpGenericAdaptorBase::Permlane32SwapOpGenericAdaptorBase(Permlane32SwapOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool Permlane32SwapOpGenericAdaptorBase::getFi() {
  auto attr = getFiAttr();
  return attr.getValue().getZExtValue();
}

bool Permlane32SwapOpGenericAdaptorBase::getBoundControl() {
  auto attr = getBoundControlAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
Permlane32SwapOpAdaptor::Permlane32SwapOpAdaptor(Permlane32SwapOp op) : Permlane32SwapOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult Permlane32SwapOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_boundControl = getProperties().boundControl; (void)tblgen_boundControl;
  if (!tblgen_boundControl) return emitError(loc, "'rocdl.permlane32.swap' op requires attribute 'boundControl'");
  auto tblgen_fi = getProperties().fi; (void)tblgen_fi;
  if (!tblgen_fi) return emitError(loc, "'rocdl.permlane32.swap' op requires attribute 'fi'");

  if (tblgen_fi && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fi))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fi).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.permlane32.swap' op attribute 'fi' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_boundControl && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_boundControl))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_boundControl).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.permlane32.swap' op attribute 'boundControl' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult Permlane32SwapOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.boundControl;
       auto attr = dict.get("boundControl");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `boundControl` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.fi;
       auto attr = dict.get("fi");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fi` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute Permlane32SwapOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.boundControl;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("boundControl",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.fi;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fi",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code Permlane32SwapOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.boundControl.getAsOpaquePointer()), 
    llvm::hash_value(prop.fi.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> Permlane32SwapOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "boundControl")
      return prop.boundControl;

    if (name == "fi")
      return prop.fi;
  return std::nullopt;
}

void Permlane32SwapOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "boundControl") {
       prop.boundControl = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.boundControl)>>(value);
       return;
    }

    if (name == "fi") {
       prop.fi = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fi)>>(value);
       return;
    }
}

void Permlane32SwapOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.boundControl) attrs.append("boundControl", prop.boundControl);

    if (prop.fi) attrs.append("fi", prop.fi);
}

::llvm::LogicalResult Permlane32SwapOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getBoundControlAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "boundControl", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getFiAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "fi", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult Permlane32SwapOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.boundControl)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.fi)))
    return ::mlir::failure();
  return ::mlir::success();
}

void Permlane32SwapOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.boundControl);
  writer.writeAttribute(prop.fi);
}

bool Permlane32SwapOp::getFi() {
  auto attr = getFiAttr();
  return attr.getValue().getZExtValue();
}

bool Permlane32SwapOp::getBoundControl() {
  auto attr = getBoundControlAttr();
  return attr.getValue().getZExtValue();
}

void Permlane32SwapOp::setFi(bool attrValue) {
  getProperties().fi = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void Permlane32SwapOp::setBoundControl(bool attrValue) {
  getProperties().boundControl = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void Permlane32SwapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  odsState.addOperands(old);
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().fi = fi;
  odsState.getOrAddProperties<Properties>().boundControl = boundControl;
  odsState.addTypes(res);
}

Permlane32SwapOp Permlane32SwapOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, old, src, fi, boundControl);
  auto __res__ = ::llvm::dyn_cast<Permlane32SwapOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

Permlane32SwapOp Permlane32SwapOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  return create(builder, builder.getLoc(), res, old, src, fi, boundControl);
}

void Permlane32SwapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  odsState.addOperands(old);
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().fi = fi;
  odsState.getOrAddProperties<Properties>().boundControl = boundControl;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

Permlane32SwapOp Permlane32SwapOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, old, src, fi, boundControl);
  auto __res__ = ::llvm::dyn_cast<Permlane32SwapOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

Permlane32SwapOp Permlane32SwapOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  return create(builder, builder.getLoc(), resultTypes, old, src, fi, boundControl);
}

void Permlane32SwapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, bool fi, bool boundControl) {
  odsState.addOperands(old);
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().fi = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), fi);
  odsState.getOrAddProperties<Properties>().boundControl = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), boundControl);
  odsState.addTypes(res);
}

Permlane32SwapOp Permlane32SwapOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, bool fi, bool boundControl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, old, src, fi, boundControl);
  auto __res__ = ::llvm::dyn_cast<Permlane32SwapOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

Permlane32SwapOp Permlane32SwapOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src, bool fi, bool boundControl) {
  return create(builder, builder.getLoc(), res, old, src, fi, boundControl);
}

void Permlane32SwapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, bool fi, bool boundControl) {
  odsState.addOperands(old);
  odsState.addOperands(src);
  odsState.getOrAddProperties<Properties>().fi = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), fi);
  odsState.getOrAddProperties<Properties>().boundControl = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), boundControl);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

Permlane32SwapOp Permlane32SwapOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, bool fi, bool boundControl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, old, src, fi, boundControl);
  auto __res__ = ::llvm::dyn_cast<Permlane32SwapOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

Permlane32SwapOp Permlane32SwapOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src, bool fi, bool boundControl) {
  return create(builder, builder.getLoc(), resultTypes, old, src, fi, boundControl);
}

void Permlane32SwapOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<Permlane32SwapOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

Permlane32SwapOp Permlane32SwapOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<Permlane32SwapOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

Permlane32SwapOp Permlane32SwapOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void Permlane32SwapOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

Permlane32SwapOp Permlane32SwapOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<Permlane32SwapOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

Permlane32SwapOp Permlane32SwapOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult Permlane32SwapOp::verifyInvariantsImpl() {
  auto tblgen_boundControl = getProperties().boundControl; (void)tblgen_boundControl;
  if (!tblgen_boundControl) return emitOpError("requires attribute 'boundControl'");
  auto tblgen_fi = getProperties().fi; (void)tblgen_fi;
  if (!tblgen_fi) return emitOpError("requires attribute 'fi'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_fi, "fi")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_boundControl, "boundControl")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps29(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult Permlane32SwapOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult Permlane32SwapOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand oldRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldOperands(&oldRawOperand, 1);  ::llvm::SMLoc oldOperandsLoc;
  (void)oldOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::IntegerAttr fiAttr;
  ::mlir::IntegerAttr boundControlAttr;
  ::mlir::Type oldRawType{};
  ::llvm::ArrayRef<::mlir::Type> oldTypes(&oldRawType, 1);
  ::mlir::Type srcRawType{};
  ::llvm::ArrayRef<::mlir::Type> srcTypes(&srcRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  oldOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(fiAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (fiAttr) result.getOrAddProperties<Permlane32SwapOp::Properties>().fi = fiAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(boundControlAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (boundControlAttr) result.getOrAddProperties<Permlane32SwapOp::Properties>().boundControl = boundControlAttr;
  if (parser.parseColon())
    return ::mlir::failure();
  if (parser.parseLParen())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    oldRawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    srcRawType = type;
  }
  if (parser.parseRParen())
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMStructType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(oldOperands, oldTypes, oldOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(srcOperands, srcTypes, srcOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void Permlane32SwapOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("fi");
  elidedAttrs.push_back("boundControl");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getOld();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getFiAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getBoundControlAttr());
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ' << "(";
  {
    auto type = getOld().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getSrc().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ")";
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMStructType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::Permlane32SwapOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::PermlaneX16Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

PermlaneX16OpGenericAdaptorBase::PermlaneX16OpGenericAdaptorBase(PermlaneX16Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

bool PermlaneX16OpGenericAdaptorBase::getFi() {
  auto attr = getFiAttr();
  return attr.getValue().getZExtValue();
}

bool PermlaneX16OpGenericAdaptorBase::getBoundControl() {
  auto attr = getBoundControlAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
PermlaneX16OpAdaptor::PermlaneX16OpAdaptor(PermlaneX16Op op) : PermlaneX16OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult PermlaneX16OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_boundControl = getProperties().boundControl; (void)tblgen_boundControl;
  if (!tblgen_boundControl) return emitError(loc, "'rocdl.permlanex16' op requires attribute 'boundControl'");
  auto tblgen_fi = getProperties().fi; (void)tblgen_fi;
  if (!tblgen_fi) return emitError(loc, "'rocdl.permlanex16' op requires attribute 'fi'");

  if (tblgen_fi && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fi))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fi).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.permlanex16' op attribute 'fi' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_boundControl && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_boundControl))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_boundControl).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.permlanex16' op attribute 'boundControl' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult PermlaneX16Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.boundControl;
       auto attr = dict.get("boundControl");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `boundControl` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.fi;
       auto attr = dict.get("fi");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fi` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute PermlaneX16Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.boundControl;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("boundControl",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.fi;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fi",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code PermlaneX16Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.boundControl.getAsOpaquePointer()), 
    llvm::hash_value(prop.fi.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> PermlaneX16Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "boundControl")
      return prop.boundControl;

    if (name == "fi")
      return prop.fi;
  return std::nullopt;
}

void PermlaneX16Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "boundControl") {
       prop.boundControl = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.boundControl)>>(value);
       return;
    }

    if (name == "fi") {
       prop.fi = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fi)>>(value);
       return;
    }
}

void PermlaneX16Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.boundControl) attrs.append("boundControl", prop.boundControl);

    if (prop.fi) attrs.append("fi", prop.fi);
}

::llvm::LogicalResult PermlaneX16Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getBoundControlAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "boundControl", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getFiAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "fi", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult PermlaneX16Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.boundControl)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.fi)))
    return ::mlir::failure();
  return ::mlir::success();
}

void PermlaneX16Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.boundControl);
  writer.writeAttribute(prop.fi);
}

bool PermlaneX16Op::getFi() {
  auto attr = getFiAttr();
  return attr.getValue().getZExtValue();
}

bool PermlaneX16Op::getBoundControl() {
  auto attr = getBoundControlAttr();
  return attr.getValue().getZExtValue();
}

void PermlaneX16Op::setFi(bool attrValue) {
  getProperties().fi = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void PermlaneX16Op::setBoundControl(bool attrValue) {
  getProperties().boundControl = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void PermlaneX16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  odsState.addOperands(old);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(src2);
  odsState.getOrAddProperties<Properties>().fi = fi;
  odsState.getOrAddProperties<Properties>().boundControl = boundControl;
  odsState.addTypes(res);
}

PermlaneX16Op PermlaneX16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, old, src0, src1, src2, fi, boundControl);
  auto __res__ = ::llvm::dyn_cast<PermlaneX16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

PermlaneX16Op PermlaneX16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  return create(builder, builder.getLoc(), res, old, src0, src1, src2, fi, boundControl);
}

void PermlaneX16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  odsState.addOperands(old);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(src2);
  odsState.getOrAddProperties<Properties>().fi = fi;
  odsState.getOrAddProperties<Properties>().boundControl = boundControl;
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

PermlaneX16Op PermlaneX16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, old, src0, src1, src2, fi, boundControl);
  auto __res__ = ::llvm::dyn_cast<PermlaneX16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

PermlaneX16Op PermlaneX16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2, ::mlir::IntegerAttr fi, ::mlir::IntegerAttr boundControl) {
  return create(builder, builder.getLoc(), resultTypes, old, src0, src1, src2, fi, boundControl);
}

void PermlaneX16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2, bool fi, bool boundControl) {
  odsState.addOperands(old);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(src2);
  odsState.getOrAddProperties<Properties>().fi = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), fi);
  odsState.getOrAddProperties<Properties>().boundControl = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), boundControl);
  odsState.addTypes(res);
}

PermlaneX16Op PermlaneX16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2, bool fi, bool boundControl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, old, src0, src1, src2, fi, boundControl);
  auto __res__ = ::llvm::dyn_cast<PermlaneX16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

PermlaneX16Op PermlaneX16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value old, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2, bool fi, bool boundControl) {
  return create(builder, builder.getLoc(), res, old, src0, src1, src2, fi, boundControl);
}

void PermlaneX16Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2, bool fi, bool boundControl) {
  odsState.addOperands(old);
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addOperands(src2);
  odsState.getOrAddProperties<Properties>().fi = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), fi);
  odsState.getOrAddProperties<Properties>().boundControl = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), boundControl);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

PermlaneX16Op PermlaneX16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2, bool fi, bool boundControl) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, old, src0, src1, src2, fi, boundControl);
  auto __res__ = ::llvm::dyn_cast<PermlaneX16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

PermlaneX16Op PermlaneX16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value old, ::mlir::Value src0, ::mlir::Value src1, ::mlir::Value src2, bool fi, bool boundControl) {
  return create(builder, builder.getLoc(), resultTypes, old, src0, src1, src2, fi, boundControl);
}

void PermlaneX16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<PermlaneX16Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

PermlaneX16Op PermlaneX16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<PermlaneX16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

PermlaneX16Op PermlaneX16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void PermlaneX16Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

PermlaneX16Op PermlaneX16Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<PermlaneX16Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

PermlaneX16Op PermlaneX16Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult PermlaneX16Op::verifyInvariantsImpl() {
  auto tblgen_boundControl = getProperties().boundControl; (void)tblgen_boundControl;
  if (!tblgen_boundControl) return emitOpError("requires attribute 'boundControl'");
  auto tblgen_fi = getProperties().fi; (void)tblgen_fi;
  if (!tblgen_fi) return emitOpError("requires attribute 'fi'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_fi, "fi")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_boundControl, "boundControl")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  if (!((((*this->getODSResults(0).begin()).getType()) == ((*this->getODSOperands(0).begin()).getType()) && ((*this->getODSOperands(0).begin()).getType()) == ((*this->getODSOperands(1).begin()).getType()) && ((*this->getODSOperands(1).begin()).getType()) == ((*this->getODSResults(0).begin()).getType()))))
    return emitOpError("failed to verify that all of {res, old, src0} have same type");
  if (!((((*this->getODSOperands(2).begin()).getType()) == ((*this->getODSOperands(3).begin()).getType()) && ((*this->getODSOperands(3).begin()).getType()) == ((*this->getODSOperands(2).begin()).getType()))))
    return emitOpError("failed to verify that all of {src1, src2} have same type");
  return ::mlir::success();
}

::llvm::LogicalResult PermlaneX16Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult PermlaneX16Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand oldRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> oldOperands(&oldRawOperand, 1);  ::llvm::SMLoc oldOperandsLoc;
  (void)oldOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand src1RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src1Operands(&src1RawOperand, 1);  ::llvm::SMLoc src1OperandsLoc;
  (void)src1OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand src2RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src2Operands(&src2RawOperand, 1);  ::llvm::SMLoc src2OperandsLoc;
  (void)src2OperandsLoc;
  ::mlir::IntegerAttr fiAttr;
  ::mlir::IntegerAttr boundControlAttr;
  ::mlir::Type src0RawType{};
  ::llvm::ArrayRef<::mlir::Type> src0Types(&src0RawType, 1);
  ::mlir::Type src1RawType{};
  ::llvm::ArrayRef<::mlir::Type> src1Types(&src1RawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  oldOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(oldRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  src1OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src1RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  src2OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src2RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(fiAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (fiAttr) result.getOrAddProperties<PermlaneX16Op::Properties>().fi = fiAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(boundControlAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (boundControlAttr) result.getOrAddProperties<PermlaneX16Op::Properties>().boundControl = boundControlAttr;
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    src0RawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    src1RawType = type;
  }
  result.addTypes(src0Types[0]);
  if (parser.resolveOperands(oldOperands, src0Types[0], oldOperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src0Operands, src0Types, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src1Operands, src1Types, src1OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src2Operands, src1Types[0], src2OperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void PermlaneX16Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("fi");
  elidedAttrs.push_back("boundControl");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getOld();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc1();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc2();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getFiAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getBoundControlAttr());
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getSrc0().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getSrc1().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::PermlaneX16Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawBufferAtomicCmpSwap definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawBufferAtomicCmpSwapGenericAdaptorBase::RawBufferAtomicCmpSwapGenericAdaptorBase(RawBufferAtomicCmpSwap op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
RawBufferAtomicCmpSwapAdaptor::RawBufferAtomicCmpSwapAdaptor(RawBufferAtomicCmpSwap op) : RawBufferAtomicCmpSwapGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawBufferAtomicCmpSwapAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult RawBufferAtomicCmpSwap::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute RawBufferAtomicCmpSwap::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawBufferAtomicCmpSwap::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> RawBufferAtomicCmpSwap::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void RawBufferAtomicCmpSwap::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void RawBufferAtomicCmpSwap::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult RawBufferAtomicCmpSwap::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void RawBufferAtomicCmpSwap::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value cmp, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  odsState.addOperands(src);
  odsState.addOperands(cmp);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  odsState.addTypes(res);
}

RawBufferAtomicCmpSwap RawBufferAtomicCmpSwap::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value cmp, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, cmp, rsrc, offset, soffset, aux);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicCmpSwap>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicCmpSwap RawBufferAtomicCmpSwap::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value cmp, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  return create(builder, builder.getLoc(), res, src, cmp, rsrc, offset, soffset, aux);
}

void RawBufferAtomicCmpSwap::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value cmp, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  odsState.addOperands(src);
  odsState.addOperands(cmp);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicCmpSwap RawBufferAtomicCmpSwap::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value cmp, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, cmp, rsrc, offset, soffset, aux);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicCmpSwap>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicCmpSwap RawBufferAtomicCmpSwap::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value cmp, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  return create(builder, builder.getLoc(), resultTypes, src, cmp, rsrc, offset, soffset, aux);
}

void RawBufferAtomicCmpSwap::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 6u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicCmpSwap RawBufferAtomicCmpSwap::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicCmpSwap>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicCmpSwap RawBufferAtomicCmpSwap::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawBufferAtomicCmpSwap::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 6u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicCmpSwap RawBufferAtomicCmpSwap::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicCmpSwap>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicCmpSwap RawBufferAtomicCmpSwap::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawBufferAtomicCmpSwap::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup5 = getODSOperands(5);

    for (auto v : valueGroup5) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  if (!((((*this->getODSResults(0).begin()).getType()) == ((*this->getODSOperands(0).begin()).getType()) && ((*this->getODSOperands(0).begin()).getType()) == ((*this->getODSOperands(1).begin()).getType()) && ((*this->getODSOperands(1).begin()).getType()) == ((*this->getODSResults(0).begin()).getType()))))
    return emitOpError("failed to verify that all of {res, src, cmp} have same type");
  return ::mlir::success();
}

::llvm::LogicalResult RawBufferAtomicCmpSwap::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult RawBufferAtomicCmpSwap::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  ::mlir::Type rsrcRawType{};
  ::llvm::ArrayRef<::mlir::Type> rsrcTypes(&rsrcRawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseLParen())
    return ::mlir::failure();
  [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(allOperands))
    return ::mlir::failure();
  if (parser.parseRParen())
    return ::mlir::failure();
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    rsrcRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(allOperands, ::llvm::concat<const ::mlir::Type>(::llvm::ArrayRef<::mlir::Type>(resTypes[0]), ::llvm::ArrayRef<::mlir::Type>(resTypes[0]), ::llvm::ArrayRef<::mlir::Type>(rsrcTypes), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType0), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType0), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType0)), allOperandLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawBufferAtomicCmpSwap::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << "(";
  _odsPrinter << getOperation()->getOperands();
  _odsPrinter << ")";
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getRsrc().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawBufferAtomicCmpSwap)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawBufferAtomicFAddOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawBufferAtomicFAddOpGenericAdaptorBase::RawBufferAtomicFAddOpGenericAdaptorBase(RawBufferAtomicFAddOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
RawBufferAtomicFAddOpAdaptor::RawBufferAtomicFAddOpAdaptor(RawBufferAtomicFAddOp op) : RawBufferAtomicFAddOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawBufferAtomicFAddOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult RawBufferAtomicFAddOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute RawBufferAtomicFAddOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawBufferAtomicFAddOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> RawBufferAtomicFAddOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void RawBufferAtomicFAddOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void RawBufferAtomicFAddOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult RawBufferAtomicFAddOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void RawBufferAtomicFAddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
}

RawBufferAtomicFAddOp RawBufferAtomicFAddOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, vdata, rsrc, offset, soffset, aux);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicFAddOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicFAddOp RawBufferAtomicFAddOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  return create(builder, builder.getLoc(), vdata, rsrc, offset, soffset, aux);
}

void RawBufferAtomicFAddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicFAddOp RawBufferAtomicFAddOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, vdata, rsrc, offset, soffset, aux);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicFAddOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicFAddOp RawBufferAtomicFAddOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  return create(builder, builder.getLoc(), resultTypes, vdata, rsrc, offset, soffset, aux);
}

void RawBufferAtomicFAddOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicFAddOp RawBufferAtomicFAddOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicFAddOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicFAddOp RawBufferAtomicFAddOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawBufferAtomicFAddOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicFAddOp RawBufferAtomicFAddOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicFAddOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicFAddOp RawBufferAtomicFAddOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawBufferAtomicFAddOp::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult RawBufferAtomicFAddOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::llvm::LogicalResult RawBufferAtomicFAddOp::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
  // keep track of used keys in the input dictionary to be able to error out
  // if there are some unknown ones.
  ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
  ::mlir::MLIRContext *ctx = dict.getContext();
  (void)ctx;

  for (::mlir::NamedAttribute attr : dict) {
    if (!usedKeys.contains(attr.getName()))
      return emitError() << "unknown key '" << attr.getName() <<
          "' when parsing properties dictionary";
  }
  return ::mlir::success();
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawBufferAtomicFAddOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawBufferAtomicFMaxOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawBufferAtomicFMaxOpGenericAdaptorBase::RawBufferAtomicFMaxOpGenericAdaptorBase(RawBufferAtomicFMaxOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
RawBufferAtomicFMaxOpAdaptor::RawBufferAtomicFMaxOpAdaptor(RawBufferAtomicFMaxOp op) : RawBufferAtomicFMaxOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawBufferAtomicFMaxOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult RawBufferAtomicFMaxOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute RawBufferAtomicFMaxOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawBufferAtomicFMaxOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> RawBufferAtomicFMaxOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void RawBufferAtomicFMaxOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void RawBufferAtomicFMaxOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult RawBufferAtomicFMaxOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void RawBufferAtomicFMaxOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
}

RawBufferAtomicFMaxOp RawBufferAtomicFMaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, vdata, rsrc, offset, soffset, aux);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicFMaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicFMaxOp RawBufferAtomicFMaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  return create(builder, builder.getLoc(), vdata, rsrc, offset, soffset, aux);
}

void RawBufferAtomicFMaxOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicFMaxOp RawBufferAtomicFMaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, vdata, rsrc, offset, soffset, aux);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicFMaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicFMaxOp RawBufferAtomicFMaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  return create(builder, builder.getLoc(), resultTypes, vdata, rsrc, offset, soffset, aux);
}

void RawBufferAtomicFMaxOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicFMaxOp RawBufferAtomicFMaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicFMaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicFMaxOp RawBufferAtomicFMaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawBufferAtomicFMaxOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicFMaxOp RawBufferAtomicFMaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicFMaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicFMaxOp RawBufferAtomicFMaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawBufferAtomicFMaxOp::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult RawBufferAtomicFMaxOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::llvm::LogicalResult RawBufferAtomicFMaxOp::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
  // keep track of used keys in the input dictionary to be able to error out
  // if there are some unknown ones.
  ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
  ::mlir::MLIRContext *ctx = dict.getContext();
  (void)ctx;

  for (::mlir::NamedAttribute attr : dict) {
    if (!usedKeys.contains(attr.getName()))
      return emitError() << "unknown key '" << attr.getName() <<
          "' when parsing properties dictionary";
  }
  return ::mlir::success();
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawBufferAtomicFMaxOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawBufferAtomicSMaxOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawBufferAtomicSMaxOpGenericAdaptorBase::RawBufferAtomicSMaxOpGenericAdaptorBase(RawBufferAtomicSMaxOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
RawBufferAtomicSMaxOpAdaptor::RawBufferAtomicSMaxOpAdaptor(RawBufferAtomicSMaxOp op) : RawBufferAtomicSMaxOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawBufferAtomicSMaxOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult RawBufferAtomicSMaxOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute RawBufferAtomicSMaxOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawBufferAtomicSMaxOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> RawBufferAtomicSMaxOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void RawBufferAtomicSMaxOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void RawBufferAtomicSMaxOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult RawBufferAtomicSMaxOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void RawBufferAtomicSMaxOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
}

RawBufferAtomicSMaxOp RawBufferAtomicSMaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, vdata, rsrc, offset, soffset, aux);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicSMaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicSMaxOp RawBufferAtomicSMaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  return create(builder, builder.getLoc(), vdata, rsrc, offset, soffset, aux);
}

void RawBufferAtomicSMaxOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicSMaxOp RawBufferAtomicSMaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, vdata, rsrc, offset, soffset, aux);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicSMaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicSMaxOp RawBufferAtomicSMaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  return create(builder, builder.getLoc(), resultTypes, vdata, rsrc, offset, soffset, aux);
}

void RawBufferAtomicSMaxOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicSMaxOp RawBufferAtomicSMaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicSMaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicSMaxOp RawBufferAtomicSMaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawBufferAtomicSMaxOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicSMaxOp RawBufferAtomicSMaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicSMaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicSMaxOp RawBufferAtomicSMaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawBufferAtomicSMaxOp::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult RawBufferAtomicSMaxOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::llvm::LogicalResult RawBufferAtomicSMaxOp::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
  // keep track of used keys in the input dictionary to be able to error out
  // if there are some unknown ones.
  ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
  ::mlir::MLIRContext *ctx = dict.getContext();
  (void)ctx;

  for (::mlir::NamedAttribute attr : dict) {
    if (!usedKeys.contains(attr.getName()))
      return emitError() << "unknown key '" << attr.getName() <<
          "' when parsing properties dictionary";
  }
  return ::mlir::success();
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawBufferAtomicSMaxOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawBufferAtomicUMinOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawBufferAtomicUMinOpGenericAdaptorBase::RawBufferAtomicUMinOpGenericAdaptorBase(RawBufferAtomicUMinOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
RawBufferAtomicUMinOpAdaptor::RawBufferAtomicUMinOpAdaptor(RawBufferAtomicUMinOp op) : RawBufferAtomicUMinOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawBufferAtomicUMinOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult RawBufferAtomicUMinOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute RawBufferAtomicUMinOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawBufferAtomicUMinOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> RawBufferAtomicUMinOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void RawBufferAtomicUMinOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void RawBufferAtomicUMinOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult RawBufferAtomicUMinOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void RawBufferAtomicUMinOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
}

RawBufferAtomicUMinOp RawBufferAtomicUMinOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, vdata, rsrc, offset, soffset, aux);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicUMinOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicUMinOp RawBufferAtomicUMinOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  return create(builder, builder.getLoc(), vdata, rsrc, offset, soffset, aux);
}

void RawBufferAtomicUMinOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicUMinOp RawBufferAtomicUMinOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, vdata, rsrc, offset, soffset, aux);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicUMinOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicUMinOp RawBufferAtomicUMinOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  return create(builder, builder.getLoc(), resultTypes, vdata, rsrc, offset, soffset, aux);
}

void RawBufferAtomicUMinOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicUMinOp RawBufferAtomicUMinOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicUMinOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicUMinOp RawBufferAtomicUMinOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawBufferAtomicUMinOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawBufferAtomicUMinOp RawBufferAtomicUMinOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawBufferAtomicUMinOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferAtomicUMinOp RawBufferAtomicUMinOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawBufferAtomicUMinOp::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult RawBufferAtomicUMinOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::llvm::LogicalResult RawBufferAtomicUMinOp::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
  // keep track of used keys in the input dictionary to be able to error out
  // if there are some unknown ones.
  ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
  ::mlir::MLIRContext *ctx = dict.getContext();
  (void)ctx;

  for (::mlir::NamedAttribute attr : dict) {
    if (!usedKeys.contains(attr.getName()))
      return emitError() << "unknown key '" << attr.getName() <<
          "' when parsing properties dictionary";
  }
  return ::mlir::success();
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawBufferAtomicUMinOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawBufferLoadOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawBufferLoadOpGenericAdaptorBase::RawBufferLoadOpGenericAdaptorBase(RawBufferLoadOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
RawBufferLoadOpAdaptor::RawBufferLoadOpAdaptor(RawBufferLoadOp op) : RawBufferLoadOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawBufferLoadOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult RawBufferLoadOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute RawBufferLoadOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawBufferLoadOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> RawBufferLoadOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void RawBufferLoadOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void RawBufferLoadOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult RawBufferLoadOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void RawBufferLoadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  odsState.addTypes(res);
}

RawBufferLoadOp RawBufferLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, rsrc, offset, soffset, aux);
  auto __res__ = ::llvm::dyn_cast<RawBufferLoadOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferLoadOp RawBufferLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  return create(builder, builder.getLoc(), res, rsrc, offset, soffset, aux);
}

void RawBufferLoadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawBufferLoadOp RawBufferLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, rsrc, offset, soffset, aux);
  auto __res__ = ::llvm::dyn_cast<RawBufferLoadOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferLoadOp RawBufferLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  return create(builder, builder.getLoc(), resultTypes, rsrc, offset, soffset, aux);
}

void RawBufferLoadOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawBufferLoadOp RawBufferLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawBufferLoadOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferLoadOp RawBufferLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawBufferLoadOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawBufferLoadOp RawBufferLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawBufferLoadOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferLoadOp RawBufferLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawBufferLoadOp::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult RawBufferLoadOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::llvm::LogicalResult RawBufferLoadOp::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
  // keep track of used keys in the input dictionary to be able to error out
  // if there are some unknown ones.
  ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
  ::mlir::MLIRContext *ctx = dict.getContext();
  (void)ctx;

  for (::mlir::NamedAttribute attr : dict) {
    if (!usedKeys.contains(attr.getName()))
      return emitError() << "unknown key '" << attr.getName() <<
          "' when parsing properties dictionary";
  }
  return ::mlir::success();
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawBufferLoadOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawBufferStoreOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawBufferStoreOpGenericAdaptorBase::RawBufferStoreOpGenericAdaptorBase(RawBufferStoreOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
RawBufferStoreOpAdaptor::RawBufferStoreOpAdaptor(RawBufferStoreOp op) : RawBufferStoreOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawBufferStoreOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult RawBufferStoreOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute RawBufferStoreOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawBufferStoreOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> RawBufferStoreOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void RawBufferStoreOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void RawBufferStoreOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult RawBufferStoreOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void RawBufferStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
}

RawBufferStoreOp RawBufferStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, vdata, rsrc, offset, soffset, aux);
  auto __res__ = ::llvm::dyn_cast<RawBufferStoreOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferStoreOp RawBufferStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  return create(builder, builder.getLoc(), vdata, rsrc, offset, soffset, aux);
}

void RawBufferStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawBufferStoreOp RawBufferStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, vdata, rsrc, offset, soffset, aux);
  auto __res__ = ::llvm::dyn_cast<RawBufferStoreOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferStoreOp RawBufferStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux) {
  return create(builder, builder.getLoc(), resultTypes, vdata, rsrc, offset, soffset, aux);
}

void RawBufferStoreOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawBufferStoreOp RawBufferStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawBufferStoreOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferStoreOp RawBufferStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawBufferStoreOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawBufferStoreOp RawBufferStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawBufferStoreOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawBufferStoreOp RawBufferStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawBufferStoreOp::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult RawBufferStoreOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::llvm::LogicalResult RawBufferStoreOp::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
  // keep track of used keys in the input dictionary to be able to error out
  // if there are some unknown ones.
  ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
  ::mlir::MLIRContext *ctx = dict.getContext();
  (void)ctx;

  for (::mlir::NamedAttribute attr : dict) {
    if (!usedKeys.contains(attr.getName()))
      return emitError() << "unknown key '" << attr.getName() <<
          "' when parsing properties dictionary";
  }
  return ::mlir::success();
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawBufferStoreOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawPtrBufferAtomicCmpSwap definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawPtrBufferAtomicCmpSwapGenericAdaptorBase::RawPtrBufferAtomicCmpSwapGenericAdaptorBase(RawPtrBufferAtomicCmpSwap op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicCmpSwapGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicCmpSwapGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicCmpSwapGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
RawPtrBufferAtomicCmpSwapAdaptor::RawPtrBufferAtomicCmpSwapAdaptor(RawPtrBufferAtomicCmpSwap op) : RawPtrBufferAtomicCmpSwapGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawPtrBufferAtomicCmpSwapAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.cmpswap' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.cmpswap' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.cmpswap' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicCmpSwap::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute RawPtrBufferAtomicCmpSwap::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawPtrBufferAtomicCmpSwap::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> RawPtrBufferAtomicCmpSwap::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void RawPtrBufferAtomicCmpSwap::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void RawPtrBufferAtomicCmpSwap::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult RawPtrBufferAtomicCmpSwap::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicCmpSwap::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferAtomicCmpSwap::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicCmpSwap::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicCmpSwap::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicCmpSwap::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void RawPtrBufferAtomicCmpSwap::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src, ::mlir::Value cmp, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(src);
  odsState.addOperands(cmp);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  odsState.addTypes(res);
}

RawPtrBufferAtomicCmpSwap RawPtrBufferAtomicCmpSwap::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value cmp, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src, cmp, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicCmpSwap>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicCmpSwap RawPtrBufferAtomicCmpSwap::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value cmp, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), res, src, cmp, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferAtomicCmpSwap::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value cmp, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(src);
  odsState.addOperands(cmp);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawPtrBufferAtomicCmpSwap RawPtrBufferAtomicCmpSwap::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value cmp, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src, cmp, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicCmpSwap>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicCmpSwap RawPtrBufferAtomicCmpSwap::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value cmp, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, src, cmp, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferAtomicCmpSwap::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 6u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<RawPtrBufferAtomicCmpSwap::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

RawPtrBufferAtomicCmpSwap RawPtrBufferAtomicCmpSwap::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicCmpSwap>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicCmpSwap RawPtrBufferAtomicCmpSwap::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawPtrBufferAtomicCmpSwap::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 6u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawPtrBufferAtomicCmpSwap RawPtrBufferAtomicCmpSwap::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicCmpSwap>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicCmpSwap RawPtrBufferAtomicCmpSwap::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawPtrBufferAtomicCmpSwap::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps30(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup5 = getODSOperands(5);

    for (auto v : valueGroup5) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  if (!((((*this->getODSResults(0).begin()).getType()) == ((*this->getODSOperands(0).begin()).getType()) && ((*this->getODSOperands(0).begin()).getType()) == ((*this->getODSOperands(1).begin()).getType()) && ((*this->getODSOperands(1).begin()).getType()) == ((*this->getODSResults(0).begin()).getType()))))
    return emitOpError("failed to verify that all of {res, src, cmp} have same type");
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicCmpSwap::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult RawPtrBufferAtomicCmpSwap::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(allOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(8);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(allOperands, ::llvm::concat<const ::mlir::Type>(::llvm::ArrayRef<::mlir::Type>(resTypes[0]), ::llvm::ArrayRef<::mlir::Type>(resTypes[0]), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType0), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1)), allOperandLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferAtomicCmpSwap::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getOperation()->getOperands();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void RawPtrBufferAtomicCmpSwap::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(2);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
  {
    auto valueRange = getODSOperandIndexAndLength(2);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Write::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> RawPtrBufferAtomicCmpSwap::getAccessedOperands() {
  return {getRsrc()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawPtrBufferAtomicCmpSwap)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawPtrBufferAtomicFaddOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawPtrBufferAtomicFaddOpGenericAdaptorBase::RawPtrBufferAtomicFaddOpGenericAdaptorBase(RawPtrBufferAtomicFaddOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicFaddOpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicFaddOpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicFaddOpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
RawPtrBufferAtomicFaddOpAdaptor::RawPtrBufferAtomicFaddOpAdaptor(RawPtrBufferAtomicFaddOp op) : RawPtrBufferAtomicFaddOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawPtrBufferAtomicFaddOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.fadd' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.fadd' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.fadd' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicFaddOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute RawPtrBufferAtomicFaddOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawPtrBufferAtomicFaddOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> RawPtrBufferAtomicFaddOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void RawPtrBufferAtomicFaddOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void RawPtrBufferAtomicFaddOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult RawPtrBufferAtomicFaddOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicFaddOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferAtomicFaddOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicFaddOp::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicFaddOp::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicFaddOp::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void RawPtrBufferAtomicFaddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

RawPtrBufferAtomicFaddOp RawPtrBufferAtomicFaddOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicFaddOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicFaddOp RawPtrBufferAtomicFaddOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferAtomicFaddOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawPtrBufferAtomicFaddOp RawPtrBufferAtomicFaddOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicFaddOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicFaddOp RawPtrBufferAtomicFaddOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferAtomicFaddOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<RawPtrBufferAtomicFaddOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

RawPtrBufferAtomicFaddOp RawPtrBufferAtomicFaddOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicFaddOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicFaddOp RawPtrBufferAtomicFaddOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawPtrBufferAtomicFaddOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawPtrBufferAtomicFaddOp RawPtrBufferAtomicFaddOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicFaddOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicFaddOp RawPtrBufferAtomicFaddOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawPtrBufferAtomicFaddOp::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps30(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicFaddOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult RawPtrBufferAtomicFaddOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
  ::mlir::Type vdataRawType{};
  ::llvm::ArrayRef<::mlir::Type> vdataTypes(&vdataRawType, 1);
  [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(allOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    vdataRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(8);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  if (parser.resolveOperands(allOperands, ::llvm::concat<const ::mlir::Type>(::llvm::ArrayRef<::mlir::Type>(vdataTypes), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType0), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1)), allOperandLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferAtomicFaddOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getOperation()->getOperands();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getVdata().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void RawPtrBufferAtomicFaddOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Write::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> RawPtrBufferAtomicFaddOp::getAccessedOperands() {
  return {getRsrc()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawPtrBufferAtomicFaddOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawPtrBufferAtomicFmaxOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawPtrBufferAtomicFmaxOpGenericAdaptorBase::RawPtrBufferAtomicFmaxOpGenericAdaptorBase(RawPtrBufferAtomicFmaxOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicFmaxOpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicFmaxOpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicFmaxOpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
RawPtrBufferAtomicFmaxOpAdaptor::RawPtrBufferAtomicFmaxOpAdaptor(RawPtrBufferAtomicFmaxOp op) : RawPtrBufferAtomicFmaxOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawPtrBufferAtomicFmaxOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.fmax' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.fmax' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.fmax' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicFmaxOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute RawPtrBufferAtomicFmaxOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawPtrBufferAtomicFmaxOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> RawPtrBufferAtomicFmaxOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void RawPtrBufferAtomicFmaxOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void RawPtrBufferAtomicFmaxOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult RawPtrBufferAtomicFmaxOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicFmaxOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferAtomicFmaxOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicFmaxOp::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicFmaxOp::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicFmaxOp::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void RawPtrBufferAtomicFmaxOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

RawPtrBufferAtomicFmaxOp RawPtrBufferAtomicFmaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicFmaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicFmaxOp RawPtrBufferAtomicFmaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferAtomicFmaxOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawPtrBufferAtomicFmaxOp RawPtrBufferAtomicFmaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicFmaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicFmaxOp RawPtrBufferAtomicFmaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferAtomicFmaxOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<RawPtrBufferAtomicFmaxOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

RawPtrBufferAtomicFmaxOp RawPtrBufferAtomicFmaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicFmaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicFmaxOp RawPtrBufferAtomicFmaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawPtrBufferAtomicFmaxOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawPtrBufferAtomicFmaxOp RawPtrBufferAtomicFmaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicFmaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicFmaxOp RawPtrBufferAtomicFmaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawPtrBufferAtomicFmaxOp::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps30(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicFmaxOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult RawPtrBufferAtomicFmaxOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
  ::mlir::Type vdataRawType{};
  ::llvm::ArrayRef<::mlir::Type> vdataTypes(&vdataRawType, 1);
  [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(allOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    vdataRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(8);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  if (parser.resolveOperands(allOperands, ::llvm::concat<const ::mlir::Type>(::llvm::ArrayRef<::mlir::Type>(vdataTypes), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType0), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1)), allOperandLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferAtomicFmaxOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getOperation()->getOperands();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getVdata().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void RawPtrBufferAtomicFmaxOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Write::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> RawPtrBufferAtomicFmaxOp::getAccessedOperands() {
  return {getRsrc()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawPtrBufferAtomicFmaxOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawPtrBufferAtomicSmaxOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawPtrBufferAtomicSmaxOpGenericAdaptorBase::RawPtrBufferAtomicSmaxOpGenericAdaptorBase(RawPtrBufferAtomicSmaxOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicSmaxOpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicSmaxOpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicSmaxOpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
RawPtrBufferAtomicSmaxOpAdaptor::RawPtrBufferAtomicSmaxOpAdaptor(RawPtrBufferAtomicSmaxOp op) : RawPtrBufferAtomicSmaxOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawPtrBufferAtomicSmaxOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.smax' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.smax' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.smax' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicSmaxOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute RawPtrBufferAtomicSmaxOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawPtrBufferAtomicSmaxOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> RawPtrBufferAtomicSmaxOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void RawPtrBufferAtomicSmaxOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void RawPtrBufferAtomicSmaxOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult RawPtrBufferAtomicSmaxOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicSmaxOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferAtomicSmaxOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicSmaxOp::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicSmaxOp::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicSmaxOp::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void RawPtrBufferAtomicSmaxOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

RawPtrBufferAtomicSmaxOp RawPtrBufferAtomicSmaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicSmaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicSmaxOp RawPtrBufferAtomicSmaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferAtomicSmaxOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawPtrBufferAtomicSmaxOp RawPtrBufferAtomicSmaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicSmaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicSmaxOp RawPtrBufferAtomicSmaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferAtomicSmaxOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<RawPtrBufferAtomicSmaxOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

RawPtrBufferAtomicSmaxOp RawPtrBufferAtomicSmaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicSmaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicSmaxOp RawPtrBufferAtomicSmaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawPtrBufferAtomicSmaxOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawPtrBufferAtomicSmaxOp RawPtrBufferAtomicSmaxOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicSmaxOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicSmaxOp RawPtrBufferAtomicSmaxOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawPtrBufferAtomicSmaxOp::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps30(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicSmaxOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult RawPtrBufferAtomicSmaxOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
  ::mlir::Type vdataRawType{};
  ::llvm::ArrayRef<::mlir::Type> vdataTypes(&vdataRawType, 1);
  [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(allOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    vdataRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(8);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  if (parser.resolveOperands(allOperands, ::llvm::concat<const ::mlir::Type>(::llvm::ArrayRef<::mlir::Type>(vdataTypes), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType0), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1)), allOperandLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferAtomicSmaxOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getOperation()->getOperands();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getVdata().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void RawPtrBufferAtomicSmaxOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Write::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> RawPtrBufferAtomicSmaxOp::getAccessedOperands() {
  return {getRsrc()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawPtrBufferAtomicSmaxOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawPtrBufferAtomicUminOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawPtrBufferAtomicUminOpGenericAdaptorBase::RawPtrBufferAtomicUminOpGenericAdaptorBase(RawPtrBufferAtomicUminOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicUminOpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicUminOpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicUminOpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
RawPtrBufferAtomicUminOpAdaptor::RawPtrBufferAtomicUminOpAdaptor(RawPtrBufferAtomicUminOp op) : RawPtrBufferAtomicUminOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawPtrBufferAtomicUminOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.umin' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.umin' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.atomic.umin' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicUminOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute RawPtrBufferAtomicUminOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawPtrBufferAtomicUminOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> RawPtrBufferAtomicUminOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void RawPtrBufferAtomicUminOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void RawPtrBufferAtomicUminOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult RawPtrBufferAtomicUminOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicUminOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferAtomicUminOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicUminOp::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicUminOp::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferAtomicUminOp::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void RawPtrBufferAtomicUminOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

RawPtrBufferAtomicUminOp RawPtrBufferAtomicUminOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicUminOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicUminOp RawPtrBufferAtomicUminOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferAtomicUminOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawPtrBufferAtomicUminOp RawPtrBufferAtomicUminOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicUminOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicUminOp RawPtrBufferAtomicUminOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferAtomicUminOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<RawPtrBufferAtomicUminOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

RawPtrBufferAtomicUminOp RawPtrBufferAtomicUminOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicUminOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicUminOp RawPtrBufferAtomicUminOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawPtrBufferAtomicUminOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawPtrBufferAtomicUminOp RawPtrBufferAtomicUminOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferAtomicUminOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferAtomicUminOp RawPtrBufferAtomicUminOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawPtrBufferAtomicUminOp::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps30(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferAtomicUminOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult RawPtrBufferAtomicUminOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
  ::mlir::Type vdataRawType{};
  ::llvm::ArrayRef<::mlir::Type> vdataTypes(&vdataRawType, 1);
  [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(allOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    vdataRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(8);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  if (parser.resolveOperands(allOperands, ::llvm::concat<const ::mlir::Type>(::llvm::ArrayRef<::mlir::Type>(vdataTypes), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType0), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1)), allOperandLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferAtomicUminOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getOperation()->getOperands();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getVdata().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void RawPtrBufferAtomicUminOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Write::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> RawPtrBufferAtomicUminOp::getAccessedOperands() {
  return {getRsrc()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawPtrBufferAtomicUminOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawPtrBufferLoadLdsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawPtrBufferLoadLdsOpGenericAdaptorBase::RawPtrBufferLoadLdsOpGenericAdaptorBase(RawPtrBufferLoadLdsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferLoadLdsOpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferLoadLdsOpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferLoadLdsOpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
RawPtrBufferLoadLdsOpAdaptor::RawPtrBufferLoadLdsOpAdaptor(RawPtrBufferLoadLdsOp op) : RawPtrBufferLoadLdsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawPtrBufferLoadLdsOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.load.lds' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.load.lds' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.load.lds' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferLoadLdsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute RawPtrBufferLoadLdsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawPtrBufferLoadLdsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> RawPtrBufferLoadLdsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void RawPtrBufferLoadLdsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void RawPtrBufferLoadLdsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult RawPtrBufferLoadLdsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferLoadLdsOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferLoadLdsOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferLoadLdsOp::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferLoadLdsOp::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferLoadLdsOp::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void RawPtrBufferLoadLdsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value rsrc, ::mlir::Value ldsPtr, ::mlir::Value size, ::mlir::Value voffset, ::mlir::Value soffset, ::mlir::Value offset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(rsrc);
  odsState.addOperands(ldsPtr);
  odsState.addOperands(size);
  odsState.addOperands(voffset);
  odsState.addOperands(soffset);
  odsState.addOperands(offset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

RawPtrBufferLoadLdsOp RawPtrBufferLoadLdsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value rsrc, ::mlir::Value ldsPtr, ::mlir::Value size, ::mlir::Value voffset, ::mlir::Value soffset, ::mlir::Value offset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, rsrc, ldsPtr, size, voffset, soffset, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferLoadLdsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferLoadLdsOp RawPtrBufferLoadLdsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value rsrc, ::mlir::Value ldsPtr, ::mlir::Value size, ::mlir::Value voffset, ::mlir::Value soffset, ::mlir::Value offset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), rsrc, ldsPtr, size, voffset, soffset, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferLoadLdsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value rsrc, ::mlir::Value ldsPtr, ::mlir::Value size, ::mlir::Value voffset, ::mlir::Value soffset, ::mlir::Value offset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(rsrc);
  odsState.addOperands(ldsPtr);
  odsState.addOperands(size);
  odsState.addOperands(voffset);
  odsState.addOperands(soffset);
  odsState.addOperands(offset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawPtrBufferLoadLdsOp RawPtrBufferLoadLdsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value rsrc, ::mlir::Value ldsPtr, ::mlir::Value size, ::mlir::Value voffset, ::mlir::Value soffset, ::mlir::Value offset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, rsrc, ldsPtr, size, voffset, soffset, offset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferLoadLdsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferLoadLdsOp RawPtrBufferLoadLdsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value rsrc, ::mlir::Value ldsPtr, ::mlir::Value size, ::mlir::Value voffset, ::mlir::Value soffset, ::mlir::Value offset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, rsrc, ldsPtr, size, voffset, soffset, offset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferLoadLdsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 7u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<RawPtrBufferLoadLdsOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

RawPtrBufferLoadLdsOp RawPtrBufferLoadLdsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferLoadLdsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferLoadLdsOp RawPtrBufferLoadLdsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawPtrBufferLoadLdsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 7u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawPtrBufferLoadLdsOp RawPtrBufferLoadLdsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferLoadLdsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferLoadLdsOp RawPtrBufferLoadLdsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawPtrBufferLoadLdsOp::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps30(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup5 = getODSOperands(5);

    for (auto v : valueGroup5) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup6 = getODSOperands(6);

    for (auto v : valueGroup6) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferLoadLdsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult RawPtrBufferLoadLdsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
  [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(allOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(8);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(3);
  ::mlir::Type odsBuildableType2 = parser.getBuilder().getIntegerType(32);
  if (parser.resolveOperands(allOperands, ::llvm::concat<const ::mlir::Type>(::llvm::ArrayRef<::mlir::Type>(odsBuildableType0), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType2), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType2), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType2), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType2), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType2)), allOperandLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferLoadLdsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getOperation()->getOperands();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}

void RawPtrBufferLoadLdsOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Write::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> RawPtrBufferLoadLdsOp::getAccessedOperands() {
  return {getRsrc(), getLdsPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawPtrBufferLoadLdsOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawPtrBufferLoadOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawPtrBufferLoadOpGenericAdaptorBase::RawPtrBufferLoadOpGenericAdaptorBase(RawPtrBufferLoadOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferLoadOpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferLoadOpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferLoadOpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
RawPtrBufferLoadOpAdaptor::RawPtrBufferLoadOpAdaptor(RawPtrBufferLoadOp op) : RawPtrBufferLoadOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawPtrBufferLoadOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.load' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.load' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.load' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferLoadOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute RawPtrBufferLoadOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawPtrBufferLoadOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> RawPtrBufferLoadOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void RawPtrBufferLoadOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void RawPtrBufferLoadOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult RawPtrBufferLoadOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferLoadOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferLoadOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferLoadOp::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferLoadOp::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferLoadOp::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void RawPtrBufferLoadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  odsState.addTypes(res);
}

RawPtrBufferLoadOp RawPtrBufferLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferLoadOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferLoadOp RawPtrBufferLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), res, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferLoadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawPtrBufferLoadOp RawPtrBufferLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferLoadOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferLoadOp RawPtrBufferLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferLoadOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<RawPtrBufferLoadOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

RawPtrBufferLoadOp RawPtrBufferLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferLoadOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferLoadOp RawPtrBufferLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawPtrBufferLoadOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawPtrBufferLoadOp RawPtrBufferLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferLoadOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferLoadOp RawPtrBufferLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawPtrBufferLoadOp::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps30(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferLoadOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult RawPtrBufferLoadOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(allOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(8);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  result.addTypes(resTypes);
  if (parser.resolveOperands(allOperands, ::llvm::concat<const ::mlir::Type>(::llvm::ArrayRef<::mlir::Type>(odsBuildableType0), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1)), allOperandLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferLoadOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getOperation()->getOperands();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void RawPtrBufferLoadOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> RawPtrBufferLoadOp::getAccessedOperands() {
  return {getRsrc()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawPtrBufferLoadOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::RawPtrBufferStoreOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

RawPtrBufferStoreOpGenericAdaptorBase::RawPtrBufferStoreOpGenericAdaptorBase(RawPtrBufferStoreOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferStoreOpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferStoreOpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferStoreOpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
RawPtrBufferStoreOpAdaptor::RawPtrBufferStoreOpAdaptor(RawPtrBufferStoreOp op) : RawPtrBufferStoreOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult RawPtrBufferStoreOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.store' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.store' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.raw.ptr.buffer.store' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferStoreOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute RawPtrBufferStoreOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code RawPtrBufferStoreOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> RawPtrBufferStoreOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void RawPtrBufferStoreOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void RawPtrBufferStoreOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult RawPtrBufferStoreOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferStoreOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferStoreOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferStoreOp::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferStoreOp::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > RawPtrBufferStoreOp::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void RawPtrBufferStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

RawPtrBufferStoreOp RawPtrBufferStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferStoreOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferStoreOp RawPtrBufferStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(vdata);
  odsState.addOperands(rsrc);
  odsState.addOperands(offset);
  odsState.addOperands(soffset);
  odsState.addOperands(aux);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

RawPtrBufferStoreOp RawPtrBufferStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferStoreOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferStoreOp RawPtrBufferStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vdata, ::mlir::Value rsrc, ::mlir::Value offset, ::mlir::Value soffset, ::mlir::Value aux, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, vdata, rsrc, offset, soffset, aux, alias_scopes, noalias_scopes, tbaa);
}

void RawPtrBufferStoreOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<RawPtrBufferStoreOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

RawPtrBufferStoreOp RawPtrBufferStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferStoreOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferStoreOp RawPtrBufferStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void RawPtrBufferStoreOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

RawPtrBufferStoreOp RawPtrBufferStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<RawPtrBufferStoreOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

RawPtrBufferStoreOp RawPtrBufferStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult RawPtrBufferStoreOp::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps30(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult RawPtrBufferStoreOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult RawPtrBufferStoreOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
  ::mlir::Type vdataRawType{};
  ::llvm::ArrayRef<::mlir::Type> vdataTypes(&vdataRawType, 1);
  [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(allOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    vdataRawType = type;
  }
  ::mlir::Type odsBuildableType0 = parser.getBuilder().getType<::mlir::LLVM::LLVMPointerType>(8);
  ::mlir::Type odsBuildableType1 = parser.getBuilder().getIntegerType(32);
  if (parser.resolveOperands(allOperands, ::llvm::concat<const ::mlir::Type>(::llvm::ArrayRef<::mlir::Type>(vdataTypes), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType0), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType1)), allOperandLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void RawPtrBufferStoreOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getOperation()->getOperands();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getVdata().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void RawPtrBufferStoreOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(1);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Write::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> RawPtrBufferStoreOp::getAccessedOperands() {
  return {getRsrc()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::RawPtrBufferStoreOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::ReadfirstlaneOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ReadfirstlaneOpGenericAdaptorBase::ReadfirstlaneOpGenericAdaptorBase(ReadfirstlaneOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ReadfirstlaneOpAdaptor::ReadfirstlaneOpAdaptor(ReadfirstlaneOp op) : ReadfirstlaneOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ReadfirstlaneOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ReadfirstlaneOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ReadfirstlaneOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ReadfirstlaneOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ReadfirstlaneOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ReadfirstlaneOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ReadfirstlaneOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ReadfirstlaneOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ReadfirstlaneOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src) {
  odsState.addOperands(src);
  odsState.addTypes(res);
}

ReadfirstlaneOp ReadfirstlaneOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src);
  auto __res__ = ::llvm::dyn_cast<ReadfirstlaneOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ReadfirstlaneOp ReadfirstlaneOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src) {
  return create(builder, builder.getLoc(), res, src);
}

void ReadfirstlaneOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src) {
  odsState.addOperands(src);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ReadfirstlaneOp ReadfirstlaneOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src);
  auto __res__ = ::llvm::dyn_cast<ReadfirstlaneOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ReadfirstlaneOp ReadfirstlaneOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src) {
  return create(builder, builder.getLoc(), resultTypes, src);
}

void ReadfirstlaneOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ReadfirstlaneOp ReadfirstlaneOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<ReadfirstlaneOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ReadfirstlaneOp ReadfirstlaneOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void ReadfirstlaneOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ReadfirstlaneOp ReadfirstlaneOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<ReadfirstlaneOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ReadfirstlaneOp ReadfirstlaneOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult ReadfirstlaneOp::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  if (!((((*this->getODSResults(0).begin()).getType()) == ((*this->getODSOperands(0).begin()).getType()) && ((*this->getODSOperands(0).begin()).getType()) == ((*this->getODSResults(0).begin()).getType()))))
    return emitOpError("failed to verify that all of {res, src} have same type");
  return ::mlir::success();
}

::llvm::LogicalResult ReadfirstlaneOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ReadfirstlaneOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand srcRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcOperands(&srcRawOperand, 1);  ::llvm::SMLoc srcOperandsLoc;
  (void)srcOperandsLoc;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  srcOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(srcRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(srcOperands, resTypes[0], srcOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void ReadfirstlaneOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getSrc();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::ReadfirstlaneOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::ReadlaneOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ReadlaneOpGenericAdaptorBase::ReadlaneOpGenericAdaptorBase(ReadlaneOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ReadlaneOpAdaptor::ReadlaneOpAdaptor(ReadlaneOp op) : ReadlaneOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ReadlaneOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ReadlaneOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ReadlaneOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ReadlaneOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ReadlaneOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ReadlaneOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ReadlaneOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ReadlaneOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ReadlaneOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value src0, ::mlir::Value src1) {
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  odsState.addTypes(res);
}

ReadlaneOp ReadlaneOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src0, ::mlir::Value src1) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, src0, src1);
  auto __res__ = ::llvm::dyn_cast<ReadlaneOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ReadlaneOp ReadlaneOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src0, ::mlir::Value src1) {
  return create(builder, builder.getLoc(), res, src0, src1);
}

void ReadlaneOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src0, ::mlir::Value src1) {
  odsState.addOperands(src0);
  odsState.addOperands(src1);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ReadlaneOp ReadlaneOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src0, ::mlir::Value src1) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, src0, src1);
  auto __res__ = ::llvm::dyn_cast<ReadlaneOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ReadlaneOp ReadlaneOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src0, ::mlir::Value src1) {
  return create(builder, builder.getLoc(), resultTypes, src0, src1);
}

void ReadlaneOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ReadlaneOp ReadlaneOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<ReadlaneOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ReadlaneOp ReadlaneOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void ReadlaneOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ReadlaneOp ReadlaneOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<ReadlaneOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ReadlaneOp ReadlaneOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult ReadlaneOp::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  if (!((((*this->getODSResults(0).begin()).getType()) == ((*this->getODSOperands(0).begin()).getType()) && ((*this->getODSOperands(0).begin()).getType()) == ((*this->getODSResults(0).begin()).getType()))))
    return emitOpError("failed to verify that all of {res, src0} have same type");
  return ::mlir::success();
}

::llvm::LogicalResult ReadlaneOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ReadlaneOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand src0RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src0Operands(&src0RawOperand, 1);  ::llvm::SMLoc src0OperandsLoc;
  (void)src0OperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand src1RawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src1Operands(&src1RawOperand, 1);  ::llvm::SMLoc src1OperandsLoc;
  (void)src1OperandsLoc;
  ::mlir::Type src0RawType{};
  ::llvm::ArrayRef<::mlir::Type> src0Types(&src0RawType, 1);
  ::mlir::Type src1RawType{};
  ::llvm::ArrayRef<::mlir::Type> src1Types(&src1RawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  src0OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src0RawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  src1OperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(src1RawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();
  if (parser.parseLParen())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    src0RawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::IntegerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    src1RawType = type;
  }
  if (parser.parseRParen())
    return ::mlir::failure();
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(src0Operands, src0Types, src0OperandsLoc, result.operands))
    return ::mlir::failure();
  if (parser.resolveOperands(src1Operands, src1Types, src1OperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void ReadlaneOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getSrc0();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getSrc1();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ' << "(";
  {
    auto type = getSrc0().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getSrc1().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ")";
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::ReadlaneOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::SBarrierOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

SBarrierOpGenericAdaptorBase::SBarrierOpGenericAdaptorBase(SBarrierOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
SBarrierOpAdaptor::SBarrierOpAdaptor(SBarrierOp op) : SBarrierOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult SBarrierOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult SBarrierOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute SBarrierOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code SBarrierOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> SBarrierOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void SBarrierOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void SBarrierOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult SBarrierOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void SBarrierOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

SBarrierOp SBarrierOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<SBarrierOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SBarrierOp SBarrierOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void SBarrierOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

SBarrierOp SBarrierOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes);
  auto __res__ = ::llvm::dyn_cast<SBarrierOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SBarrierOp SBarrierOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), resultTypes);
}

void SBarrierOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

SBarrierOp SBarrierOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<SBarrierOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SBarrierOp SBarrierOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void SBarrierOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

SBarrierOp SBarrierOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<SBarrierOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SBarrierOp SBarrierOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult SBarrierOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult SBarrierOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult SBarrierOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void SBarrierOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::SBarrierOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::SSleepOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

SSleepOpGenericAdaptorBase::SSleepOpGenericAdaptorBase(SSleepOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t SSleepOpGenericAdaptorBase::getCount() {
  auto attr = getCountAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
SSleepOpAdaptor::SSleepOpAdaptor(SSleepOp op) : SSleepOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult SSleepOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_count = getProperties().count; (void)tblgen_count;
  if (!tblgen_count) return emitError(loc, "'rocdl.s.sleep' op requires attribute 'count'");

  if (tblgen_count && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_count))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_count).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.s.sleep' op attribute 'count' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult SSleepOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.count;
       auto attr = dict.get("count");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `count` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute SSleepOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.count;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("count",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code SSleepOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.count.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> SSleepOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "count")
      return prop.count;
  return std::nullopt;
}

void SSleepOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "count") {
       prop.count = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.count)>>(value);
       return;
    }
}

void SSleepOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.count) attrs.append("count", prop.count);
}

::llvm::LogicalResult SSleepOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getCountAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "count", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult SSleepOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.count)))
    return ::mlir::failure();
  return ::mlir::success();
}

void SSleepOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.count);
}

uint32_t SSleepOp::getCount() {
  auto attr = getCountAttr();
  return attr.getValue().getZExtValue();
}

void SSleepOp::setCount(uint32_t attrValue) {
  getProperties().count = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void SSleepOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count) {
  odsState.getOrAddProperties<Properties>().count = count;
}

SSleepOp SSleepOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, count);
  auto __res__ = ::llvm::dyn_cast<SSleepOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SSleepOp SSleepOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr count) {
  return create(builder, builder.getLoc(), count);
}

void SSleepOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  odsState.getOrAddProperties<Properties>().count = count;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

SSleepOp SSleepOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, count);
  auto __res__ = ::llvm::dyn_cast<SSleepOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SSleepOp SSleepOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  return create(builder, builder.getLoc(), resultTypes, count);
}

void SSleepOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t count) {
  odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), count);
}

SSleepOp SSleepOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, count);
  auto __res__ = ::llvm::dyn_cast<SSleepOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SSleepOp SSleepOp::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t count) {
  return create(builder, builder.getLoc(), count);
}

void SSleepOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t count) {
  odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), count);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

SSleepOp SSleepOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, count);
  auto __res__ = ::llvm::dyn_cast<SSleepOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SSleepOp SSleepOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t count) {
  return create(builder, builder.getLoc(), resultTypes, count);
}

void SSleepOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<SSleepOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

SSleepOp SSleepOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<SSleepOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SSleepOp SSleepOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void SSleepOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

SSleepOp SSleepOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<SSleepOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SSleepOp SSleepOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult SSleepOp::verifyInvariantsImpl() {
  auto tblgen_count = getProperties().count; (void)tblgen_count;
  if (!tblgen_count) return emitOpError("requires attribute 'count'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_count, "count")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult SSleepOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult SSleepOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr countAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  if (parser.parseCustomAttributeWithFallback(countAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (countAttr) result.getOrAddProperties<SSleepOp::Properties>().count = countAttr;
  return ::mlir::success();
}

void SSleepOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("count");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getCountAttr());
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::SSleepOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::SWaitcntOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

SWaitcntOpGenericAdaptorBase::SWaitcntOpGenericAdaptorBase(SWaitcntOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t SWaitcntOpGenericAdaptorBase::getBitfield() {
  auto attr = getBitfieldAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
SWaitcntOpAdaptor::SWaitcntOpAdaptor(SWaitcntOp op) : SWaitcntOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult SWaitcntOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_bitfield = getProperties().bitfield; (void)tblgen_bitfield;
  if (!tblgen_bitfield) return emitError(loc, "'rocdl.s.waitcnt' op requires attribute 'bitfield'");

  if (tblgen_bitfield && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_bitfield))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_bitfield).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.s.waitcnt' op attribute 'bitfield' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult SWaitcntOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.bitfield;
       auto attr = dict.get("bitfield");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `bitfield` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute SWaitcntOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.bitfield;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("bitfield",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code SWaitcntOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.bitfield.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> SWaitcntOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "bitfield")
      return prop.bitfield;
  return std::nullopt;
}

void SWaitcntOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "bitfield") {
       prop.bitfield = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.bitfield)>>(value);
       return;
    }
}

void SWaitcntOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.bitfield) attrs.append("bitfield", prop.bitfield);
}

::llvm::LogicalResult SWaitcntOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getBitfieldAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "bitfield", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult SWaitcntOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.bitfield)))
    return ::mlir::failure();
  return ::mlir::success();
}

void SWaitcntOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.bitfield);
}

uint32_t SWaitcntOp::getBitfield() {
  auto attr = getBitfieldAttr();
  return attr.getValue().getZExtValue();
}

void SWaitcntOp::setBitfield(uint32_t attrValue) {
  getProperties().bitfield = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void SWaitcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr bitfield) {
  odsState.getOrAddProperties<Properties>().bitfield = bitfield;
}

SWaitcntOp SWaitcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr bitfield) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, bitfield);
  auto __res__ = ::llvm::dyn_cast<SWaitcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SWaitcntOp SWaitcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr bitfield) {
  return create(builder, builder.getLoc(), bitfield);
}

void SWaitcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr bitfield) {
  odsState.getOrAddProperties<Properties>().bitfield = bitfield;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

SWaitcntOp SWaitcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr bitfield) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, bitfield);
  auto __res__ = ::llvm::dyn_cast<SWaitcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SWaitcntOp SWaitcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr bitfield) {
  return create(builder, builder.getLoc(), resultTypes, bitfield);
}

void SWaitcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t bitfield) {
  odsState.getOrAddProperties<Properties>().bitfield = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), bitfield);
}

SWaitcntOp SWaitcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t bitfield) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, bitfield);
  auto __res__ = ::llvm::dyn_cast<SWaitcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SWaitcntOp SWaitcntOp::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t bitfield) {
  return create(builder, builder.getLoc(), bitfield);
}

void SWaitcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t bitfield) {
  odsState.getOrAddProperties<Properties>().bitfield = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), bitfield);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

SWaitcntOp SWaitcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t bitfield) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, bitfield);
  auto __res__ = ::llvm::dyn_cast<SWaitcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SWaitcntOp SWaitcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t bitfield) {
  return create(builder, builder.getLoc(), resultTypes, bitfield);
}

void SWaitcntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<SWaitcntOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

SWaitcntOp SWaitcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<SWaitcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SWaitcntOp SWaitcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void SWaitcntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

SWaitcntOp SWaitcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<SWaitcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SWaitcntOp SWaitcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult SWaitcntOp::verifyInvariantsImpl() {
  auto tblgen_bitfield = getProperties().bitfield; (void)tblgen_bitfield;
  if (!tblgen_bitfield) return emitOpError("requires attribute 'bitfield'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_bitfield, "bitfield")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult SWaitcntOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult SWaitcntOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr bitfieldAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }

  if (parser.parseCustomAttributeWithFallback(bitfieldAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (bitfieldAttr) result.getOrAddProperties<SWaitcntOp::Properties>().bitfield = bitfieldAttr;
  return ::mlir::success();
}

void SWaitcntOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("bitfield");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getBitfieldAttr());
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::SWaitcntOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::SchedBarrier definitions
//===----------------------------------------------------------------------===//

namespace detail {

SchedBarrierGenericAdaptorBase::SchedBarrierGenericAdaptorBase(SchedBarrier op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t SchedBarrierGenericAdaptorBase::getMask() {
  auto attr = getMaskAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
SchedBarrierAdaptor::SchedBarrierAdaptor(SchedBarrier op) : SchedBarrierGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult SchedBarrierAdaptor::verify(::mlir::Location loc) {
  auto tblgen_mask = getProperties().mask; (void)tblgen_mask;
  if (!tblgen_mask) return emitError(loc, "'rocdl.sched.barrier' op requires attribute 'mask'");

  if (tblgen_mask && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_mask))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_mask).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.sched.barrier' op attribute 'mask' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult SchedBarrier::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.mask;
       auto attr = dict.get("mask");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `mask` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute SchedBarrier::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.mask;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("mask",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code SchedBarrier::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.mask.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> SchedBarrier::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "mask")
      return prop.mask;
  return std::nullopt;
}

void SchedBarrier::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "mask") {
       prop.mask = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.mask)>>(value);
       return;
    }
}

void SchedBarrier::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.mask) attrs.append("mask", prop.mask);
}

::llvm::LogicalResult SchedBarrier::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getMaskAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "mask", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult SchedBarrier::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.mask)))
    return ::mlir::failure();
  return ::mlir::success();
}

void SchedBarrier::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.mask);
}

uint32_t SchedBarrier::getMask() {
  auto attr = getMaskAttr();
  return attr.getValue().getZExtValue();
}

void SchedBarrier::setMask(uint32_t attrValue) {
  getProperties().mask = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void SchedBarrier::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr mask) {
  odsState.getOrAddProperties<Properties>().mask = mask;
}

SchedBarrier SchedBarrier::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr mask) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, mask);
  auto __res__ = ::llvm::dyn_cast<SchedBarrier>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SchedBarrier SchedBarrier::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr mask) {
  return create(builder, builder.getLoc(), mask);
}

void SchedBarrier::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr mask) {
  odsState.getOrAddProperties<Properties>().mask = mask;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

SchedBarrier SchedBarrier::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr mask) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, mask);
  auto __res__ = ::llvm::dyn_cast<SchedBarrier>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SchedBarrier SchedBarrier::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr mask) {
  return create(builder, builder.getLoc(), resultTypes, mask);
}

void SchedBarrier::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t mask) {
  odsState.getOrAddProperties<Properties>().mask = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), mask);
}

SchedBarrier SchedBarrier::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t mask) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, mask);
  auto __res__ = ::llvm::dyn_cast<SchedBarrier>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SchedBarrier SchedBarrier::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t mask) {
  return create(builder, builder.getLoc(), mask);
}

void SchedBarrier::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t mask) {
  odsState.getOrAddProperties<Properties>().mask = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), mask);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

SchedBarrier SchedBarrier::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t mask) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, mask);
  auto __res__ = ::llvm::dyn_cast<SchedBarrier>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SchedBarrier SchedBarrier::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t mask) {
  return create(builder, builder.getLoc(), resultTypes, mask);
}

void SchedBarrier::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<SchedBarrier::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

SchedBarrier SchedBarrier::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<SchedBarrier>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SchedBarrier SchedBarrier::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void SchedBarrier::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

SchedBarrier SchedBarrier::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<SchedBarrier>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SchedBarrier SchedBarrier::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult SchedBarrier::verifyInvariantsImpl() {
  auto tblgen_mask = getProperties().mask; (void)tblgen_mask;
  if (!tblgen_mask) return emitOpError("requires attribute 'mask'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_mask, "mask")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult SchedBarrier::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult SchedBarrier::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr maskAttr;

  if (parser.parseCustomAttributeWithFallback(maskAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (maskAttr) result.getOrAddProperties<SchedBarrier::Properties>().mask = maskAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void SchedBarrier::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getMaskAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("mask");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::SchedBarrier)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::SchedGroupBarrier definitions
//===----------------------------------------------------------------------===//

namespace detail {

SchedGroupBarrierGenericAdaptorBase::SchedGroupBarrierGenericAdaptorBase(SchedGroupBarrier op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t SchedGroupBarrierGenericAdaptorBase::getMask() {
  auto attr = getMaskAttr();
  return attr.getValue().getZExtValue();
}

uint32_t SchedGroupBarrierGenericAdaptorBase::getSize() {
  auto attr = getSizeAttr();
  return attr.getValue().getZExtValue();
}

uint32_t SchedGroupBarrierGenericAdaptorBase::getGroupId() {
  auto attr = getGroupIdAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
SchedGroupBarrierAdaptor::SchedGroupBarrierAdaptor(SchedGroupBarrier op) : SchedGroupBarrierGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult SchedGroupBarrierAdaptor::verify(::mlir::Location loc) {
  auto tblgen_groupId = getProperties().groupId; (void)tblgen_groupId;
  if (!tblgen_groupId) return emitError(loc, "'rocdl.sched.group.barrier' op requires attribute 'groupId'");
  auto tblgen_mask = getProperties().mask; (void)tblgen_mask;
  if (!tblgen_mask) return emitError(loc, "'rocdl.sched.group.barrier' op requires attribute 'mask'");
  auto tblgen_size = getProperties().size; (void)tblgen_size;
  if (!tblgen_size) return emitError(loc, "'rocdl.sched.group.barrier' op requires attribute 'size'");

  if (tblgen_mask && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_mask))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_mask).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.sched.group.barrier' op attribute 'mask' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_size && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_size))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_size).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.sched.group.barrier' op attribute 'size' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_groupId && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_groupId))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_groupId).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.sched.group.barrier' op attribute 'groupId' failed to satisfy constraint: 32-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult SchedGroupBarrier::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.groupId;
       auto attr = dict.get("groupId");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `groupId` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.mask;
       auto attr = dict.get("mask");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `mask` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.size;
       auto attr = dict.get("size");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `size` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute SchedGroupBarrier::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.groupId;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("groupId",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.mask;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("mask",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.size;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("size",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code SchedGroupBarrier::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.groupId.getAsOpaquePointer()), 
    llvm::hash_value(prop.mask.getAsOpaquePointer()), 
    llvm::hash_value(prop.size.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> SchedGroupBarrier::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "groupId")
      return prop.groupId;

    if (name == "mask")
      return prop.mask;

    if (name == "size")
      return prop.size;
  return std::nullopt;
}

void SchedGroupBarrier::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "groupId") {
       prop.groupId = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.groupId)>>(value);
       return;
    }

    if (name == "mask") {
       prop.mask = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.mask)>>(value);
       return;
    }

    if (name == "size") {
       prop.size = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.size)>>(value);
       return;
    }
}

void SchedGroupBarrier::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.groupId) attrs.append("groupId", prop.groupId);

    if (prop.mask) attrs.append("mask", prop.mask);

    if (prop.size) attrs.append("size", prop.size);
}

::llvm::LogicalResult SchedGroupBarrier::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getGroupIdAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "groupId", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getMaskAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "mask", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSizeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "size", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult SchedGroupBarrier::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.groupId)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.mask)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.size)))
    return ::mlir::failure();
  return ::mlir::success();
}

void SchedGroupBarrier::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.groupId);
  writer.writeAttribute(prop.mask);
  writer.writeAttribute(prop.size);
}

uint32_t SchedGroupBarrier::getMask() {
  auto attr = getMaskAttr();
  return attr.getValue().getZExtValue();
}

uint32_t SchedGroupBarrier::getSize() {
  auto attr = getSizeAttr();
  return attr.getValue().getZExtValue();
}

uint32_t SchedGroupBarrier::getGroupId() {
  auto attr = getGroupIdAttr();
  return attr.getValue().getZExtValue();
}

void SchedGroupBarrier::setMask(uint32_t attrValue) {
  getProperties().mask = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void SchedGroupBarrier::setSize(uint32_t attrValue) {
  getProperties().size = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void SchedGroupBarrier::setGroupId(uint32_t attrValue) {
  getProperties().groupId = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void SchedGroupBarrier::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr mask, ::mlir::IntegerAttr size, ::mlir::IntegerAttr groupId) {
  odsState.getOrAddProperties<Properties>().mask = mask;
  odsState.getOrAddProperties<Properties>().size = size;
  odsState.getOrAddProperties<Properties>().groupId = groupId;
}

SchedGroupBarrier SchedGroupBarrier::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr mask, ::mlir::IntegerAttr size, ::mlir::IntegerAttr groupId) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, mask, size, groupId);
  auto __res__ = ::llvm::dyn_cast<SchedGroupBarrier>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SchedGroupBarrier SchedGroupBarrier::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr mask, ::mlir::IntegerAttr size, ::mlir::IntegerAttr groupId) {
  return create(builder, builder.getLoc(), mask, size, groupId);
}

void SchedGroupBarrier::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr mask, ::mlir::IntegerAttr size, ::mlir::IntegerAttr groupId) {
  odsState.getOrAddProperties<Properties>().mask = mask;
  odsState.getOrAddProperties<Properties>().size = size;
  odsState.getOrAddProperties<Properties>().groupId = groupId;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

SchedGroupBarrier SchedGroupBarrier::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr mask, ::mlir::IntegerAttr size, ::mlir::IntegerAttr groupId) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, mask, size, groupId);
  auto __res__ = ::llvm::dyn_cast<SchedGroupBarrier>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SchedGroupBarrier SchedGroupBarrier::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr mask, ::mlir::IntegerAttr size, ::mlir::IntegerAttr groupId) {
  return create(builder, builder.getLoc(), resultTypes, mask, size, groupId);
}

void SchedGroupBarrier::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t mask, uint32_t size, uint32_t groupId) {
  odsState.getOrAddProperties<Properties>().mask = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), mask);
  odsState.getOrAddProperties<Properties>().size = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), size);
  odsState.getOrAddProperties<Properties>().groupId = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), groupId);
}

SchedGroupBarrier SchedGroupBarrier::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t mask, uint32_t size, uint32_t groupId) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, mask, size, groupId);
  auto __res__ = ::llvm::dyn_cast<SchedGroupBarrier>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SchedGroupBarrier SchedGroupBarrier::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t mask, uint32_t size, uint32_t groupId) {
  return create(builder, builder.getLoc(), mask, size, groupId);
}

void SchedGroupBarrier::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t mask, uint32_t size, uint32_t groupId) {
  odsState.getOrAddProperties<Properties>().mask = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), mask);
  odsState.getOrAddProperties<Properties>().size = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), size);
  odsState.getOrAddProperties<Properties>().groupId = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), groupId);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

SchedGroupBarrier SchedGroupBarrier::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t mask, uint32_t size, uint32_t groupId) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, mask, size, groupId);
  auto __res__ = ::llvm::dyn_cast<SchedGroupBarrier>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SchedGroupBarrier SchedGroupBarrier::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t mask, uint32_t size, uint32_t groupId) {
  return create(builder, builder.getLoc(), resultTypes, mask, size, groupId);
}

void SchedGroupBarrier::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<SchedGroupBarrier::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

SchedGroupBarrier SchedGroupBarrier::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<SchedGroupBarrier>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SchedGroupBarrier SchedGroupBarrier::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void SchedGroupBarrier::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

SchedGroupBarrier SchedGroupBarrier::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<SchedGroupBarrier>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SchedGroupBarrier SchedGroupBarrier::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult SchedGroupBarrier::verifyInvariantsImpl() {
  auto tblgen_groupId = getProperties().groupId; (void)tblgen_groupId;
  if (!tblgen_groupId) return emitOpError("requires attribute 'groupId'");
  auto tblgen_mask = getProperties().mask; (void)tblgen_mask;
  if (!tblgen_mask) return emitOpError("requires attribute 'mask'");
  auto tblgen_size = getProperties().size; (void)tblgen_size;
  if (!tblgen_size) return emitOpError("requires attribute 'size'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_mask, "mask")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_size, "size")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_groupId, "groupId")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult SchedGroupBarrier::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult SchedGroupBarrier::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr maskAttr;
  ::mlir::IntegerAttr sizeAttr;
  ::mlir::IntegerAttr groupIdAttr;

  if (parser.parseCustomAttributeWithFallback(maskAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (maskAttr) result.getOrAddProperties<SchedGroupBarrier::Properties>().mask = maskAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(sizeAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (sizeAttr) result.getOrAddProperties<SchedGroupBarrier::Properties>().size = sizeAttr;
  if (parser.parseComma())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(groupIdAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (groupIdAttr) result.getOrAddProperties<SchedGroupBarrier::Properties>().groupId = groupIdAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void SchedGroupBarrier::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getMaskAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getSizeAttr());
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getGroupIdAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("mask");
  elidedAttrs.push_back("size");
  elidedAttrs.push_back("groupId");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::SchedGroupBarrier)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::SetPrioOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

SetPrioOpGenericAdaptorBase::SetPrioOpGenericAdaptorBase(SetPrioOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint16_t SetPrioOpGenericAdaptorBase::getPriority() {
  auto attr = getPriorityAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
SetPrioOpAdaptor::SetPrioOpAdaptor(SetPrioOp op) : SetPrioOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult SetPrioOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_priority = getProperties().priority; (void)tblgen_priority;
  if (!tblgen_priority) return emitError(loc, "'rocdl.s.setprio' op requires attribute 'priority'");

  if (tblgen_priority && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_priority))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_priority).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.s.setprio' op attribute 'priority' failed to satisfy constraint: 16-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult SetPrioOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.priority;
       auto attr = dict.get("priority");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `priority` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute SetPrioOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.priority;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("priority",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code SetPrioOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.priority.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> SetPrioOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "priority")
      return prop.priority;
  return std::nullopt;
}

void SetPrioOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "priority") {
       prop.priority = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.priority)>>(value);
       return;
    }
}

void SetPrioOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.priority) attrs.append("priority", prop.priority);
}

::llvm::LogicalResult SetPrioOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getPriorityAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "priority", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult SetPrioOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.priority)))
    return ::mlir::failure();
  return ::mlir::success();
}

void SetPrioOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.priority);
}

uint16_t SetPrioOp::getPriority() {
  auto attr = getPriorityAttr();
  return attr.getValue().getZExtValue();
}

void SetPrioOp::setPriority(uint16_t attrValue) {
  getProperties().priority = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void SetPrioOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr priority) {
  odsState.getOrAddProperties<Properties>().priority = priority;
}

SetPrioOp SetPrioOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr priority) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, priority);
  auto __res__ = ::llvm::dyn_cast<SetPrioOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SetPrioOp SetPrioOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr priority) {
  return create(builder, builder.getLoc(), priority);
}

void SetPrioOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr priority) {
  odsState.getOrAddProperties<Properties>().priority = priority;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

SetPrioOp SetPrioOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr priority) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, priority);
  auto __res__ = ::llvm::dyn_cast<SetPrioOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SetPrioOp SetPrioOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr priority) {
  return create(builder, builder.getLoc(), resultTypes, priority);
}

void SetPrioOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint16_t priority) {
  odsState.getOrAddProperties<Properties>().priority = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), priority);
}

SetPrioOp SetPrioOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint16_t priority) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, priority);
  auto __res__ = ::llvm::dyn_cast<SetPrioOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SetPrioOp SetPrioOp::create(::mlir::ImplicitLocOpBuilder &builder, uint16_t priority) {
  return create(builder, builder.getLoc(), priority);
}

void SetPrioOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint16_t priority) {
  odsState.getOrAddProperties<Properties>().priority = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), priority);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

SetPrioOp SetPrioOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint16_t priority) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, priority);
  auto __res__ = ::llvm::dyn_cast<SetPrioOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SetPrioOp SetPrioOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint16_t priority) {
  return create(builder, builder.getLoc(), resultTypes, priority);
}

void SetPrioOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<SetPrioOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

SetPrioOp SetPrioOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<SetPrioOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SetPrioOp SetPrioOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void SetPrioOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

SetPrioOp SetPrioOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<SetPrioOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

SetPrioOp SetPrioOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult SetPrioOp::verifyInvariantsImpl() {
  auto tblgen_priority = getProperties().priority; (void)tblgen_priority;
  if (!tblgen_priority) return emitOpError("requires attribute 'priority'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_priority, "priority")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult SetPrioOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult SetPrioOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr priorityAttr;

  if (parser.parseCustomAttributeWithFallback(priorityAttr, parser.getBuilder().getIntegerType(16))) {
    return ::mlir::failure();
  }
  if (priorityAttr) result.getOrAddProperties<SetPrioOp::Properties>().priority = priorityAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void SetPrioOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getPriorityAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("priority");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::SetPrioOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::TensorLoadToLDSD2Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

TensorLoadToLDSD2OpGenericAdaptorBase::TensorLoadToLDSD2OpGenericAdaptorBase(TensorLoadToLDSD2Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t TensorLoadToLDSD2OpGenericAdaptorBase::getCachePolicy() {
  auto attr = getCachePolicyAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > TensorLoadToLDSD2OpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorLoadToLDSD2OpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorLoadToLDSD2OpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
TensorLoadToLDSD2OpAdaptor::TensorLoadToLDSD2OpAdaptor(TensorLoadToLDSD2Op op) : TensorLoadToLDSD2OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult TensorLoadToLDSD2OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_cachePolicy = getProperties().cachePolicy; (void)tblgen_cachePolicy;
  if (!tblgen_cachePolicy) return emitError(loc, "'rocdl.tensor.load.to.lds.d2' op requires attribute 'cachePolicy'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_cachePolicy && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_cachePolicy))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_cachePolicy).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.tensor.load.to.lds.d2' op attribute 'cachePolicy' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.tensor.load.to.lds.d2' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.tensor.load.to.lds.d2' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.tensor.load.to.lds.d2' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult TensorLoadToLDSD2Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.cachePolicy;
       auto attr = dict.get("cachePolicy");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `cachePolicy` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute TensorLoadToLDSD2Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.cachePolicy;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("cachePolicy",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code TensorLoadToLDSD2Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.cachePolicy.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> TensorLoadToLDSD2Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "cachePolicy")
      return prop.cachePolicy;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void TensorLoadToLDSD2Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "cachePolicy") {
       prop.cachePolicy = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.cachePolicy)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void TensorLoadToLDSD2Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.cachePolicy) attrs.append("cachePolicy", prop.cachePolicy);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult TensorLoadToLDSD2Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getCachePolicyAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "cachePolicy", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult TensorLoadToLDSD2Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.cachePolicy)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void TensorLoadToLDSD2Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);
  writer.writeAttribute(prop.cachePolicy);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

uint32_t TensorLoadToLDSD2Op::getCachePolicy() {
  auto attr = getCachePolicyAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > TensorLoadToLDSD2Op::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorLoadToLDSD2Op::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorLoadToLDSD2Op::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void TensorLoadToLDSD2Op::setCachePolicy(uint32_t attrValue) {
  getProperties().cachePolicy = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void TensorLoadToLDSD2Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.getOrAddProperties<Properties>().cachePolicy = cachePolicy;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

TensorLoadToLDSD2Op TensorLoadToLDSD2Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorLoadToLDSD2Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorLoadToLDSD2Op TensorLoadToLDSD2Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorLoadToLDSD2Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.getOrAddProperties<Properties>().cachePolicy = cachePolicy;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

TensorLoadToLDSD2Op TensorLoadToLDSD2Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorLoadToLDSD2Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorLoadToLDSD2Op TensorLoadToLDSD2Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorLoadToLDSD2Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dgroup0, ::mlir::Value dgroup1, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.getOrAddProperties<Properties>().cachePolicy = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), cachePolicy);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

TensorLoadToLDSD2Op TensorLoadToLDSD2Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dgroup0, ::mlir::Value dgroup1, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorLoadToLDSD2Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorLoadToLDSD2Op TensorLoadToLDSD2Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dgroup0, ::mlir::Value dgroup1, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorLoadToLDSD2Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.getOrAddProperties<Properties>().cachePolicy = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), cachePolicy);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

TensorLoadToLDSD2Op TensorLoadToLDSD2Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorLoadToLDSD2Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorLoadToLDSD2Op TensorLoadToLDSD2Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorLoadToLDSD2Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<TensorLoadToLDSD2Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

TensorLoadToLDSD2Op TensorLoadToLDSD2Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<TensorLoadToLDSD2Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorLoadToLDSD2Op TensorLoadToLDSD2Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void TensorLoadToLDSD2Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

TensorLoadToLDSD2Op TensorLoadToLDSD2Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<TensorLoadToLDSD2Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorLoadToLDSD2Op TensorLoadToLDSD2Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult TensorLoadToLDSD2Op::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_cachePolicy = getProperties().cachePolicy; (void)tblgen_cachePolicy;
  if (!tblgen_cachePolicy) return emitOpError("requires attribute 'cachePolicy'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_cachePolicy, "cachePolicy")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps31(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps32(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult TensorLoadToLDSD2Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult TensorLoadToLDSD2Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
  ::mlir::IntegerAttr cachePolicyAttr;
  ::mlir::Type dgroup0RawType{};
  ::llvm::ArrayRef<::mlir::Type> dgroup0Types(&dgroup0RawType, 1);
  ::mlir::Type dgroup1RawType{};
  ::llvm::ArrayRef<::mlir::Type> dgroup1Types(&dgroup1RawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(allOperands))
    return ::mlir::failure();
  if (parser.parseKeyword("cachepolicy"))
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(cachePolicyAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (cachePolicyAttr) result.getOrAddProperties<TensorLoadToLDSD2Op::Properties>().cachePolicy = cachePolicyAttr;
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    dgroup0RawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    dgroup1RawType = type;
  }
  if (parser.resolveOperands(allOperands, ::llvm::concat<const ::mlir::Type>(::llvm::ArrayRef<::mlir::Type>(dgroup0Types), ::llvm::ArrayRef<::mlir::Type>(dgroup1Types)), allOperandLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void TensorLoadToLDSD2Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("cachePolicy");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getOperation()->getOperands();
  _odsPrinter << ' ' << "cachepolicy";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getCachePolicyAttr());
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getDgroup0().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getDgroup1().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

SmallVector<Value> TensorLoadToLDSD2Op::getAccessedOperands() {
  return {getDgroup0(), getDgroup1()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::TensorLoadToLDSD2Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::TensorLoadToLDSOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

TensorLoadToLDSOpGenericAdaptorBase::TensorLoadToLDSOpGenericAdaptorBase(TensorLoadToLDSOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t TensorLoadToLDSOpGenericAdaptorBase::getCachePolicy() {
  auto attr = getCachePolicyAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > TensorLoadToLDSOpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorLoadToLDSOpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorLoadToLDSOpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
TensorLoadToLDSOpAdaptor::TensorLoadToLDSOpAdaptor(TensorLoadToLDSOp op) : TensorLoadToLDSOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult TensorLoadToLDSOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_cachePolicy = getProperties().cachePolicy; (void)tblgen_cachePolicy;
  if (!tblgen_cachePolicy) return emitError(loc, "'rocdl.tensor.load.to.lds' op requires attribute 'cachePolicy'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_cachePolicy && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_cachePolicy))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_cachePolicy).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.tensor.load.to.lds' op attribute 'cachePolicy' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.tensor.load.to.lds' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.tensor.load.to.lds' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.tensor.load.to.lds' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult TensorLoadToLDSOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.cachePolicy;
       auto attr = dict.get("cachePolicy");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `cachePolicy` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute TensorLoadToLDSOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.cachePolicy;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("cachePolicy",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code TensorLoadToLDSOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.cachePolicy.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> TensorLoadToLDSOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "cachePolicy")
      return prop.cachePolicy;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void TensorLoadToLDSOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "cachePolicy") {
       prop.cachePolicy = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.cachePolicy)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void TensorLoadToLDSOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.cachePolicy) attrs.append("cachePolicy", prop.cachePolicy);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult TensorLoadToLDSOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getCachePolicyAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "cachePolicy", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult TensorLoadToLDSOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.cachePolicy)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void TensorLoadToLDSOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);
  writer.writeAttribute(prop.cachePolicy);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

uint32_t TensorLoadToLDSOp::getCachePolicy() {
  auto attr = getCachePolicyAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > TensorLoadToLDSOp::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorLoadToLDSOp::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorLoadToLDSOp::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void TensorLoadToLDSOp::setCachePolicy(uint32_t attrValue) {
  getProperties().cachePolicy = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void TensorLoadToLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.addOperands(dgroup2);
  odsState.addOperands(dgroup3);
  odsState.getOrAddProperties<Properties>().cachePolicy = cachePolicy;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

TensorLoadToLDSOp TensorLoadToLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorLoadToLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorLoadToLDSOp TensorLoadToLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorLoadToLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.addOperands(dgroup2);
  odsState.addOperands(dgroup3);
  odsState.getOrAddProperties<Properties>().cachePolicy = cachePolicy;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

TensorLoadToLDSOp TensorLoadToLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorLoadToLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorLoadToLDSOp TensorLoadToLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorLoadToLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.addOperands(dgroup2);
  odsState.addOperands(dgroup3);
  odsState.getOrAddProperties<Properties>().cachePolicy = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), cachePolicy);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

TensorLoadToLDSOp TensorLoadToLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorLoadToLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorLoadToLDSOp TensorLoadToLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorLoadToLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.addOperands(dgroup2);
  odsState.addOperands(dgroup3);
  odsState.getOrAddProperties<Properties>().cachePolicy = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), cachePolicy);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

TensorLoadToLDSOp TensorLoadToLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorLoadToLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorLoadToLDSOp TensorLoadToLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorLoadToLDSOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<TensorLoadToLDSOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

TensorLoadToLDSOp TensorLoadToLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<TensorLoadToLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorLoadToLDSOp TensorLoadToLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void TensorLoadToLDSOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

TensorLoadToLDSOp TensorLoadToLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<TensorLoadToLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorLoadToLDSOp TensorLoadToLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult TensorLoadToLDSOp::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_cachePolicy = getProperties().cachePolicy; (void)tblgen_cachePolicy;
  if (!tblgen_cachePolicy) return emitOpError("requires attribute 'cachePolicy'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_cachePolicy, "cachePolicy")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps31(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps32(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps31(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps31(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult TensorLoadToLDSOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult TensorLoadToLDSOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
  ::mlir::IntegerAttr cachePolicyAttr;
  ::mlir::Type dgroup0RawType{};
  ::llvm::ArrayRef<::mlir::Type> dgroup0Types(&dgroup0RawType, 1);
  ::mlir::Type dgroup1RawType{};
  ::llvm::ArrayRef<::mlir::Type> dgroup1Types(&dgroup1RawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(allOperands))
    return ::mlir::failure();
  if (parser.parseKeyword("cachepolicy"))
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(cachePolicyAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (cachePolicyAttr) result.getOrAddProperties<TensorLoadToLDSOp::Properties>().cachePolicy = cachePolicyAttr;
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    dgroup0RawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    dgroup1RawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({4} ,parser.getBuilder().getIntegerType(32));
  if (parser.resolveOperands(allOperands, ::llvm::concat<const ::mlir::Type>(::llvm::ArrayRef<::mlir::Type>(dgroup0Types), ::llvm::ArrayRef<::mlir::Type>(dgroup1Types), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType0), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType0)), allOperandLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void TensorLoadToLDSOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("cachePolicy");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getOperation()->getOperands();
  _odsPrinter << ' ' << "cachepolicy";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getCachePolicyAttr());
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getDgroup0().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getDgroup1().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

SmallVector<Value> TensorLoadToLDSOp::getAccessedOperands() {
  return {getDgroup0(), getDgroup1(), getDgroup2(), getDgroup3()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::TensorLoadToLDSOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::TensorStoreFromLDSD2Op definitions
//===----------------------------------------------------------------------===//

namespace detail {

TensorStoreFromLDSD2OpGenericAdaptorBase::TensorStoreFromLDSD2OpGenericAdaptorBase(TensorStoreFromLDSD2Op op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t TensorStoreFromLDSD2OpGenericAdaptorBase::getCachePolicy() {
  auto attr = getCachePolicyAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > TensorStoreFromLDSD2OpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorStoreFromLDSD2OpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorStoreFromLDSD2OpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
TensorStoreFromLDSD2OpAdaptor::TensorStoreFromLDSD2OpAdaptor(TensorStoreFromLDSD2Op op) : TensorStoreFromLDSD2OpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult TensorStoreFromLDSD2OpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_cachePolicy = getProperties().cachePolicy; (void)tblgen_cachePolicy;
  if (!tblgen_cachePolicy) return emitError(loc, "'rocdl.tensor.store.from.lds.d2' op requires attribute 'cachePolicy'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_cachePolicy && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_cachePolicy))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_cachePolicy).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.tensor.store.from.lds.d2' op attribute 'cachePolicy' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.tensor.store.from.lds.d2' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.tensor.store.from.lds.d2' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.tensor.store.from.lds.d2' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult TensorStoreFromLDSD2Op::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.cachePolicy;
       auto attr = dict.get("cachePolicy");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `cachePolicy` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute TensorStoreFromLDSD2Op::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.cachePolicy;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("cachePolicy",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code TensorStoreFromLDSD2Op::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.cachePolicy.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> TensorStoreFromLDSD2Op::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "cachePolicy")
      return prop.cachePolicy;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void TensorStoreFromLDSD2Op::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "cachePolicy") {
       prop.cachePolicy = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.cachePolicy)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void TensorStoreFromLDSD2Op::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.cachePolicy) attrs.append("cachePolicy", prop.cachePolicy);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult TensorStoreFromLDSD2Op::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getCachePolicyAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "cachePolicy", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult TensorStoreFromLDSD2Op::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.cachePolicy)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void TensorStoreFromLDSD2Op::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);
  writer.writeAttribute(prop.cachePolicy);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

uint32_t TensorStoreFromLDSD2Op::getCachePolicy() {
  auto attr = getCachePolicyAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > TensorStoreFromLDSD2Op::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorStoreFromLDSD2Op::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorStoreFromLDSD2Op::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void TensorStoreFromLDSD2Op::setCachePolicy(uint32_t attrValue) {
  getProperties().cachePolicy = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void TensorStoreFromLDSD2Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.getOrAddProperties<Properties>().cachePolicy = cachePolicy;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

TensorStoreFromLDSD2Op TensorStoreFromLDSD2Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorStoreFromLDSD2Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorStoreFromLDSD2Op TensorStoreFromLDSD2Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorStoreFromLDSD2Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.getOrAddProperties<Properties>().cachePolicy = cachePolicy;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

TensorStoreFromLDSD2Op TensorStoreFromLDSD2Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorStoreFromLDSD2Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorStoreFromLDSD2Op TensorStoreFromLDSD2Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorStoreFromLDSD2Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dgroup0, ::mlir::Value dgroup1, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.getOrAddProperties<Properties>().cachePolicy = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), cachePolicy);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

TensorStoreFromLDSD2Op TensorStoreFromLDSD2Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dgroup0, ::mlir::Value dgroup1, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorStoreFromLDSD2Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorStoreFromLDSD2Op TensorStoreFromLDSD2Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dgroup0, ::mlir::Value dgroup1, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorStoreFromLDSD2Op::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.getOrAddProperties<Properties>().cachePolicy = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), cachePolicy);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

TensorStoreFromLDSD2Op TensorStoreFromLDSD2Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorStoreFromLDSD2Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorStoreFromLDSD2Op TensorStoreFromLDSD2Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, dgroup0, dgroup1, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorStoreFromLDSD2Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<TensorStoreFromLDSD2Op::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

TensorStoreFromLDSD2Op TensorStoreFromLDSD2Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<TensorStoreFromLDSD2Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorStoreFromLDSD2Op TensorStoreFromLDSD2Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void TensorStoreFromLDSD2Op::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 2u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

TensorStoreFromLDSD2Op TensorStoreFromLDSD2Op::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<TensorStoreFromLDSD2Op>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorStoreFromLDSD2Op TensorStoreFromLDSD2Op::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult TensorStoreFromLDSD2Op::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_cachePolicy = getProperties().cachePolicy; (void)tblgen_cachePolicy;
  if (!tblgen_cachePolicy) return emitOpError("requires attribute 'cachePolicy'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_cachePolicy, "cachePolicy")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps31(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps32(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult TensorStoreFromLDSD2Op::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult TensorStoreFromLDSD2Op::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
  ::mlir::IntegerAttr cachePolicyAttr;
  ::mlir::Type dgroup0RawType{};
  ::llvm::ArrayRef<::mlir::Type> dgroup0Types(&dgroup0RawType, 1);
  ::mlir::Type dgroup1RawType{};
  ::llvm::ArrayRef<::mlir::Type> dgroup1Types(&dgroup1RawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(allOperands))
    return ::mlir::failure();
  if (parser.parseKeyword("cachepolicy"))
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(cachePolicyAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (cachePolicyAttr) result.getOrAddProperties<TensorStoreFromLDSD2Op::Properties>().cachePolicy = cachePolicyAttr;
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    dgroup0RawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    dgroup1RawType = type;
  }
  if (parser.resolveOperands(allOperands, ::llvm::concat<const ::mlir::Type>(::llvm::ArrayRef<::mlir::Type>(dgroup0Types), ::llvm::ArrayRef<::mlir::Type>(dgroup1Types)), allOperandLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void TensorStoreFromLDSD2Op::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("cachePolicy");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getOperation()->getOperands();
  _odsPrinter << ' ' << "cachepolicy";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getCachePolicyAttr());
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getDgroup0().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getDgroup1().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

SmallVector<Value> TensorStoreFromLDSD2Op::getAccessedOperands() {
  return {getDgroup0(), getDgroup1()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::TensorStoreFromLDSD2Op)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::TensorStoreFromLDSOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

TensorStoreFromLDSOpGenericAdaptorBase::TensorStoreFromLDSOpGenericAdaptorBase(TensorStoreFromLDSOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint32_t TensorStoreFromLDSOpGenericAdaptorBase::getCachePolicy() {
  auto attr = getCachePolicyAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > TensorStoreFromLDSOpGenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorStoreFromLDSOpGenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorStoreFromLDSOpGenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
TensorStoreFromLDSOpAdaptor::TensorStoreFromLDSOpAdaptor(TensorStoreFromLDSOp op) : TensorStoreFromLDSOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult TensorStoreFromLDSOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_cachePolicy = getProperties().cachePolicy; (void)tblgen_cachePolicy;
  if (!tblgen_cachePolicy) return emitError(loc, "'rocdl.tensor.store.from.lds' op requires attribute 'cachePolicy'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_cachePolicy && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_cachePolicy))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_cachePolicy).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.tensor.store.from.lds' op attribute 'cachePolicy' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.tensor.store.from.lds' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.tensor.store.from.lds' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.tensor.store.from.lds' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult TensorStoreFromLDSOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.cachePolicy;
       auto attr = dict.get("cachePolicy");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `cachePolicy` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute TensorStoreFromLDSOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.cachePolicy;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("cachePolicy",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code TensorStoreFromLDSOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.cachePolicy.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> TensorStoreFromLDSOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "cachePolicy")
      return prop.cachePolicy;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void TensorStoreFromLDSOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "cachePolicy") {
       prop.cachePolicy = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.cachePolicy)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void TensorStoreFromLDSOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.cachePolicy) attrs.append("cachePolicy", prop.cachePolicy);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult TensorStoreFromLDSOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getCachePolicyAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "cachePolicy", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult TensorStoreFromLDSOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readAttribute(prop.cachePolicy)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void TensorStoreFromLDSOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);
  writer.writeAttribute(prop.cachePolicy);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

uint32_t TensorStoreFromLDSOp::getCachePolicy() {
  auto attr = getCachePolicyAttr();
  return attr.getValue().getZExtValue();
}

::std::optional< ::mlir::ArrayAttr > TensorStoreFromLDSOp::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorStoreFromLDSOp::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > TensorStoreFromLDSOp::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void TensorStoreFromLDSOp::setCachePolicy(uint32_t attrValue) {
  getProperties().cachePolicy = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void TensorStoreFromLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.addOperands(dgroup2);
  odsState.addOperands(dgroup3);
  odsState.getOrAddProperties<Properties>().cachePolicy = cachePolicy;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

TensorStoreFromLDSOp TensorStoreFromLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorStoreFromLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorStoreFromLDSOp TensorStoreFromLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorStoreFromLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.addOperands(dgroup2);
  odsState.addOperands(dgroup3);
  odsState.getOrAddProperties<Properties>().cachePolicy = cachePolicy;
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

TensorStoreFromLDSOp TensorStoreFromLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorStoreFromLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorStoreFromLDSOp TensorStoreFromLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, ::mlir::IntegerAttr cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorStoreFromLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.addOperands(dgroup2);
  odsState.addOperands(dgroup3);
  odsState.getOrAddProperties<Properties>().cachePolicy = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), cachePolicy);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
}

TensorStoreFromLDSOp TensorStoreFromLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorStoreFromLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorStoreFromLDSOp TensorStoreFromLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorStoreFromLDSOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(dgroup0);
  odsState.addOperands(dgroup1);
  odsState.addOperands(dgroup2);
  odsState.addOperands(dgroup3);
  odsState.getOrAddProperties<Properties>().cachePolicy = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), cachePolicy);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

TensorStoreFromLDSOp TensorStoreFromLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<TensorStoreFromLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorStoreFromLDSOp TensorStoreFromLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dgroup0, ::mlir::Value dgroup1, ::mlir::Value dgroup2, ::mlir::Value dgroup3, uint32_t cachePolicy, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, dgroup0, dgroup1, dgroup2, dgroup3, cachePolicy, alias_scopes, noalias_scopes, tbaa);
}

void TensorStoreFromLDSOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<TensorStoreFromLDSOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

TensorStoreFromLDSOp TensorStoreFromLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<TensorStoreFromLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorStoreFromLDSOp TensorStoreFromLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void TensorStoreFromLDSOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 4u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

TensorStoreFromLDSOp TensorStoreFromLDSOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<TensorStoreFromLDSOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

TensorStoreFromLDSOp TensorStoreFromLDSOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult TensorStoreFromLDSOp::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_cachePolicy = getProperties().cachePolicy; (void)tblgen_cachePolicy;
  if (!tblgen_cachePolicy) return emitOpError("requires attribute 'cachePolicy'");
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_cachePolicy, "cachePolicy")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps31(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps32(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps31(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps31(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult TensorStoreFromLDSOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult TensorStoreFromLDSOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
  ::mlir::IntegerAttr cachePolicyAttr;
  ::mlir::Type dgroup0RawType{};
  ::llvm::ArrayRef<::mlir::Type> dgroup0Types(&dgroup0RawType, 1);
  ::mlir::Type dgroup1RawType{};
  ::llvm::ArrayRef<::mlir::Type> dgroup1Types(&dgroup1RawType, 1);
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(allOperands))
    return ::mlir::failure();
  if (parser.parseKeyword("cachepolicy"))
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(cachePolicyAttr, parser.getBuilder().getIntegerType(32))) {
    return ::mlir::failure();
  }
  if (cachePolicyAttr) result.getOrAddProperties<TensorStoreFromLDSOp::Properties>().cachePolicy = cachePolicyAttr;
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    dgroup0RawType = type;
  }
  if (parser.parseComma())
    return ::mlir::failure();

  {
    ::mlir::VectorType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    dgroup1RawType = type;
  }
  ::mlir::Type odsBuildableType0 = ::mlir::VectorType::get({4} ,parser.getBuilder().getIntegerType(32));
  if (parser.resolveOperands(allOperands, ::llvm::concat<const ::mlir::Type>(::llvm::ArrayRef<::mlir::Type>(dgroup0Types), ::llvm::ArrayRef<::mlir::Type>(dgroup1Types), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType0), ::llvm::ArrayRef<::mlir::Type>(odsBuildableType0)), allOperandLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void TensorStoreFromLDSOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("cachePolicy");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ';
  _odsPrinter << getOperation()->getOperands();
  _odsPrinter << ' ' << "cachepolicy";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getCachePolicyAttr());
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getDgroup0().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ",";
  _odsPrinter << ' ';
  {
    auto type = getDgroup1().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

SmallVector<Value> TensorStoreFromLDSOp::getAccessedOperands() {
  return {getDgroup0(), getDgroup1(), getDgroup2(), getDgroup3()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::TensorStoreFromLDSOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::ThreadIdXOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ThreadIdXOpGenericAdaptorBase::ThreadIdXOpGenericAdaptorBase(ThreadIdXOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> ThreadIdXOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
ThreadIdXOpAdaptor::ThreadIdXOpAdaptor(ThreadIdXOp op) : ThreadIdXOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ThreadIdXOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.workitem.id.x' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult ThreadIdXOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ThreadIdXOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ThreadIdXOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ThreadIdXOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void ThreadIdXOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void ThreadIdXOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult ThreadIdXOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ThreadIdXOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ThreadIdXOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> ThreadIdXOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void ThreadIdXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

ThreadIdXOp ThreadIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<ThreadIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdXOp ThreadIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void ThreadIdXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

ThreadIdXOp ThreadIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<ThreadIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdXOp ThreadIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void ThreadIdXOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ThreadIdXOp ThreadIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<ThreadIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdXOp ThreadIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void ThreadIdXOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<ThreadIdXOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ThreadIdXOp ThreadIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<ThreadIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdXOp ThreadIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void ThreadIdXOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ThreadIdXOp ThreadIdXOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<ThreadIdXOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdXOp ThreadIdXOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult ThreadIdXOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult ThreadIdXOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ThreadIdXOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<ThreadIdXOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void ThreadIdXOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void ThreadIdXOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::ThreadIdXOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::ThreadIdYOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ThreadIdYOpGenericAdaptorBase::ThreadIdYOpGenericAdaptorBase(ThreadIdYOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> ThreadIdYOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
ThreadIdYOpAdaptor::ThreadIdYOpAdaptor(ThreadIdYOp op) : ThreadIdYOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ThreadIdYOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.workitem.id.y' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult ThreadIdYOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ThreadIdYOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ThreadIdYOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ThreadIdYOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void ThreadIdYOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void ThreadIdYOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult ThreadIdYOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ThreadIdYOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ThreadIdYOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> ThreadIdYOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void ThreadIdYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

ThreadIdYOp ThreadIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<ThreadIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdYOp ThreadIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void ThreadIdYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

ThreadIdYOp ThreadIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<ThreadIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdYOp ThreadIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void ThreadIdYOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ThreadIdYOp ThreadIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<ThreadIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdYOp ThreadIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void ThreadIdYOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<ThreadIdYOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ThreadIdYOp ThreadIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<ThreadIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdYOp ThreadIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void ThreadIdYOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ThreadIdYOp ThreadIdYOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<ThreadIdYOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdYOp ThreadIdYOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult ThreadIdYOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult ThreadIdYOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ThreadIdYOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<ThreadIdYOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void ThreadIdYOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void ThreadIdYOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::ThreadIdYOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::ThreadIdZOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ThreadIdZOpGenericAdaptorBase::ThreadIdZOpGenericAdaptorBase(ThreadIdZOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> ThreadIdZOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
ThreadIdZOpAdaptor::ThreadIdZOpAdaptor(ThreadIdZOp op) : ThreadIdZOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ThreadIdZOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.workitem.id.z' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult ThreadIdZOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ThreadIdZOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ThreadIdZOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ThreadIdZOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void ThreadIdZOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void ThreadIdZOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult ThreadIdZOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ThreadIdZOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ThreadIdZOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> ThreadIdZOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void ThreadIdZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

ThreadIdZOp ThreadIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<ThreadIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdZOp ThreadIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void ThreadIdZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

ThreadIdZOp ThreadIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<ThreadIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdZOp ThreadIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void ThreadIdZOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ThreadIdZOp ThreadIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<ThreadIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdZOp ThreadIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void ThreadIdZOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<ThreadIdZOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ThreadIdZOp ThreadIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<ThreadIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdZOp ThreadIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void ThreadIdZOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ThreadIdZOp ThreadIdZOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<ThreadIdZOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ThreadIdZOp ThreadIdZOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult ThreadIdZOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult ThreadIdZOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ThreadIdZOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<ThreadIdZOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void ThreadIdZOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void ThreadIdZOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::ThreadIdZOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::WaitAsynccntOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

WaitAsynccntOpGenericAdaptorBase::WaitAsynccntOpGenericAdaptorBase(WaitAsynccntOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint16_t WaitAsynccntOpGenericAdaptorBase::getCount() {
  auto attr = getCountAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
WaitAsynccntOpAdaptor::WaitAsynccntOpAdaptor(WaitAsynccntOp op) : WaitAsynccntOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult WaitAsynccntOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_count = getProperties().count; (void)tblgen_count;
  if (!tblgen_count) return emitError(loc, "'rocdl.s.wait.asynccnt' op requires attribute 'count'");

  if (tblgen_count && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_count))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_count).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.s.wait.asynccnt' op attribute 'count' failed to satisfy constraint: 16-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult WaitAsynccntOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.count;
       auto attr = dict.get("count");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `count` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute WaitAsynccntOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.count;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("count",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code WaitAsynccntOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.count.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> WaitAsynccntOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "count")
      return prop.count;
  return std::nullopt;
}

void WaitAsynccntOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "count") {
       prop.count = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.count)>>(value);
       return;
    }
}

void WaitAsynccntOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.count) attrs.append("count", prop.count);
}

::llvm::LogicalResult WaitAsynccntOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getCountAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "count", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult WaitAsynccntOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.count)))
    return ::mlir::failure();
  return ::mlir::success();
}

void WaitAsynccntOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.count);
}

uint16_t WaitAsynccntOp::getCount() {
  auto attr = getCountAttr();
  return attr.getValue().getZExtValue();
}

void WaitAsynccntOp::setCount(uint16_t attrValue) {
  getProperties().count = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void WaitAsynccntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count) {
  odsState.getOrAddProperties<Properties>().count = count;
}

WaitAsynccntOp WaitAsynccntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, count);
  auto __res__ = ::llvm::dyn_cast<WaitAsynccntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitAsynccntOp WaitAsynccntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr count) {
  return create(builder, builder.getLoc(), count);
}

void WaitAsynccntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  odsState.getOrAddProperties<Properties>().count = count;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

WaitAsynccntOp WaitAsynccntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, count);
  auto __res__ = ::llvm::dyn_cast<WaitAsynccntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitAsynccntOp WaitAsynccntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  return create(builder, builder.getLoc(), resultTypes, count);
}

void WaitAsynccntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint16_t count) {
  odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), count);
}

WaitAsynccntOp WaitAsynccntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint16_t count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, count);
  auto __res__ = ::llvm::dyn_cast<WaitAsynccntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitAsynccntOp WaitAsynccntOp::create(::mlir::ImplicitLocOpBuilder &builder, uint16_t count) {
  return create(builder, builder.getLoc(), count);
}

void WaitAsynccntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint16_t count) {
  odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), count);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

WaitAsynccntOp WaitAsynccntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint16_t count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, count);
  auto __res__ = ::llvm::dyn_cast<WaitAsynccntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitAsynccntOp WaitAsynccntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint16_t count) {
  return create(builder, builder.getLoc(), resultTypes, count);
}

void WaitAsynccntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<WaitAsynccntOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

WaitAsynccntOp WaitAsynccntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<WaitAsynccntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitAsynccntOp WaitAsynccntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void WaitAsynccntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

WaitAsynccntOp WaitAsynccntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<WaitAsynccntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitAsynccntOp WaitAsynccntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult WaitAsynccntOp::verifyInvariantsImpl() {
  auto tblgen_count = getProperties().count; (void)tblgen_count;
  if (!tblgen_count) return emitOpError("requires attribute 'count'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_count, "count")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult WaitAsynccntOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult WaitAsynccntOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr countAttr;

  if (parser.parseCustomAttributeWithFallback(countAttr, parser.getBuilder().getIntegerType(16))) {
    return ::mlir::failure();
  }
  if (countAttr) result.getOrAddProperties<WaitAsynccntOp::Properties>().count = countAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void WaitAsynccntOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getCountAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("count");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::WaitAsynccntOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::WaitDscntOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

WaitDscntOpGenericAdaptorBase::WaitDscntOpGenericAdaptorBase(WaitDscntOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint16_t WaitDscntOpGenericAdaptorBase::getCount() {
  auto attr = getCountAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
WaitDscntOpAdaptor::WaitDscntOpAdaptor(WaitDscntOp op) : WaitDscntOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult WaitDscntOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_count = getProperties().count; (void)tblgen_count;
  if (!tblgen_count) return emitError(loc, "'rocdl.s.wait.dscnt' op requires attribute 'count'");

  if (tblgen_count && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_count))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_count).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.s.wait.dscnt' op attribute 'count' failed to satisfy constraint: 16-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult WaitDscntOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.count;
       auto attr = dict.get("count");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `count` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute WaitDscntOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.count;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("count",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code WaitDscntOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.count.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> WaitDscntOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "count")
      return prop.count;
  return std::nullopt;
}

void WaitDscntOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "count") {
       prop.count = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.count)>>(value);
       return;
    }
}

void WaitDscntOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.count) attrs.append("count", prop.count);
}

::llvm::LogicalResult WaitDscntOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getCountAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "count", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult WaitDscntOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.count)))
    return ::mlir::failure();
  return ::mlir::success();
}

void WaitDscntOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.count);
}

uint16_t WaitDscntOp::getCount() {
  auto attr = getCountAttr();
  return attr.getValue().getZExtValue();
}

void WaitDscntOp::setCount(uint16_t attrValue) {
  getProperties().count = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void WaitDscntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count) {
  odsState.getOrAddProperties<Properties>().count = count;
}

WaitDscntOp WaitDscntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, count);
  auto __res__ = ::llvm::dyn_cast<WaitDscntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitDscntOp WaitDscntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr count) {
  return create(builder, builder.getLoc(), count);
}

void WaitDscntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  odsState.getOrAddProperties<Properties>().count = count;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

WaitDscntOp WaitDscntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, count);
  auto __res__ = ::llvm::dyn_cast<WaitDscntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitDscntOp WaitDscntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  return create(builder, builder.getLoc(), resultTypes, count);
}

void WaitDscntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint16_t count) {
  odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), count);
}

WaitDscntOp WaitDscntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint16_t count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, count);
  auto __res__ = ::llvm::dyn_cast<WaitDscntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitDscntOp WaitDscntOp::create(::mlir::ImplicitLocOpBuilder &builder, uint16_t count) {
  return create(builder, builder.getLoc(), count);
}

void WaitDscntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint16_t count) {
  odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), count);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

WaitDscntOp WaitDscntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint16_t count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, count);
  auto __res__ = ::llvm::dyn_cast<WaitDscntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitDscntOp WaitDscntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint16_t count) {
  return create(builder, builder.getLoc(), resultTypes, count);
}

void WaitDscntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<WaitDscntOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

WaitDscntOp WaitDscntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<WaitDscntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitDscntOp WaitDscntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void WaitDscntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

WaitDscntOp WaitDscntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<WaitDscntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitDscntOp WaitDscntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult WaitDscntOp::verifyInvariantsImpl() {
  auto tblgen_count = getProperties().count; (void)tblgen_count;
  if (!tblgen_count) return emitOpError("requires attribute 'count'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_count, "count")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult WaitDscntOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult WaitDscntOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr countAttr;

  if (parser.parseCustomAttributeWithFallback(countAttr, parser.getBuilder().getIntegerType(16))) {
    return ::mlir::failure();
  }
  if (countAttr) result.getOrAddProperties<WaitDscntOp::Properties>().count = countAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void WaitDscntOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getCountAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("count");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::WaitDscntOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::WaitExpcntOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

WaitExpcntOpGenericAdaptorBase::WaitExpcntOpGenericAdaptorBase(WaitExpcntOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint16_t WaitExpcntOpGenericAdaptorBase::getCount() {
  auto attr = getCountAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
WaitExpcntOpAdaptor::WaitExpcntOpAdaptor(WaitExpcntOp op) : WaitExpcntOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult WaitExpcntOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_count = getProperties().count; (void)tblgen_count;
  if (!tblgen_count) return emitError(loc, "'rocdl.s.wait.expcnt' op requires attribute 'count'");

  if (tblgen_count && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_count))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_count).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.s.wait.expcnt' op attribute 'count' failed to satisfy constraint: 16-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult WaitExpcntOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.count;
       auto attr = dict.get("count");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `count` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute WaitExpcntOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.count;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("count",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code WaitExpcntOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.count.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> WaitExpcntOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "count")
      return prop.count;
  return std::nullopt;
}

void WaitExpcntOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "count") {
       prop.count = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.count)>>(value);
       return;
    }
}

void WaitExpcntOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.count) attrs.append("count", prop.count);
}

::llvm::LogicalResult WaitExpcntOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getCountAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "count", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult WaitExpcntOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.count)))
    return ::mlir::failure();
  return ::mlir::success();
}

void WaitExpcntOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.count);
}

uint16_t WaitExpcntOp::getCount() {
  auto attr = getCountAttr();
  return attr.getValue().getZExtValue();
}

void WaitExpcntOp::setCount(uint16_t attrValue) {
  getProperties().count = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void WaitExpcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count) {
  odsState.getOrAddProperties<Properties>().count = count;
}

WaitExpcntOp WaitExpcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, count);
  auto __res__ = ::llvm::dyn_cast<WaitExpcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitExpcntOp WaitExpcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr count) {
  return create(builder, builder.getLoc(), count);
}

void WaitExpcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  odsState.getOrAddProperties<Properties>().count = count;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

WaitExpcntOp WaitExpcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, count);
  auto __res__ = ::llvm::dyn_cast<WaitExpcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitExpcntOp WaitExpcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  return create(builder, builder.getLoc(), resultTypes, count);
}

void WaitExpcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint16_t count) {
  odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), count);
}

WaitExpcntOp WaitExpcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint16_t count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, count);
  auto __res__ = ::llvm::dyn_cast<WaitExpcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitExpcntOp WaitExpcntOp::create(::mlir::ImplicitLocOpBuilder &builder, uint16_t count) {
  return create(builder, builder.getLoc(), count);
}

void WaitExpcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint16_t count) {
  odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), count);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

WaitExpcntOp WaitExpcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint16_t count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, count);
  auto __res__ = ::llvm::dyn_cast<WaitExpcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitExpcntOp WaitExpcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint16_t count) {
  return create(builder, builder.getLoc(), resultTypes, count);
}

void WaitExpcntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<WaitExpcntOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

WaitExpcntOp WaitExpcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<WaitExpcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitExpcntOp WaitExpcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void WaitExpcntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

WaitExpcntOp WaitExpcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<WaitExpcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitExpcntOp WaitExpcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult WaitExpcntOp::verifyInvariantsImpl() {
  auto tblgen_count = getProperties().count; (void)tblgen_count;
  if (!tblgen_count) return emitOpError("requires attribute 'count'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_count, "count")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult WaitExpcntOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult WaitExpcntOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr countAttr;

  if (parser.parseCustomAttributeWithFallback(countAttr, parser.getBuilder().getIntegerType(16))) {
    return ::mlir::failure();
  }
  if (countAttr) result.getOrAddProperties<WaitExpcntOp::Properties>().count = countAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void WaitExpcntOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getCountAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("count");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::WaitExpcntOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::WaitLoadcntOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

WaitLoadcntOpGenericAdaptorBase::WaitLoadcntOpGenericAdaptorBase(WaitLoadcntOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint16_t WaitLoadcntOpGenericAdaptorBase::getCount() {
  auto attr = getCountAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
WaitLoadcntOpAdaptor::WaitLoadcntOpAdaptor(WaitLoadcntOp op) : WaitLoadcntOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult WaitLoadcntOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_count = getProperties().count; (void)tblgen_count;
  if (!tblgen_count) return emitError(loc, "'rocdl.s.wait.loadcnt' op requires attribute 'count'");

  if (tblgen_count && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_count))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_count).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.s.wait.loadcnt' op attribute 'count' failed to satisfy constraint: 16-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult WaitLoadcntOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.count;
       auto attr = dict.get("count");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `count` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute WaitLoadcntOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.count;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("count",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code WaitLoadcntOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.count.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> WaitLoadcntOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "count")
      return prop.count;
  return std::nullopt;
}

void WaitLoadcntOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "count") {
       prop.count = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.count)>>(value);
       return;
    }
}

void WaitLoadcntOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.count) attrs.append("count", prop.count);
}

::llvm::LogicalResult WaitLoadcntOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getCountAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "count", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult WaitLoadcntOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.count)))
    return ::mlir::failure();
  return ::mlir::success();
}

void WaitLoadcntOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.count);
}

uint16_t WaitLoadcntOp::getCount() {
  auto attr = getCountAttr();
  return attr.getValue().getZExtValue();
}

void WaitLoadcntOp::setCount(uint16_t attrValue) {
  getProperties().count = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void WaitLoadcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count) {
  odsState.getOrAddProperties<Properties>().count = count;
}

WaitLoadcntOp WaitLoadcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, count);
  auto __res__ = ::llvm::dyn_cast<WaitLoadcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitLoadcntOp WaitLoadcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr count) {
  return create(builder, builder.getLoc(), count);
}

void WaitLoadcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  odsState.getOrAddProperties<Properties>().count = count;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

WaitLoadcntOp WaitLoadcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, count);
  auto __res__ = ::llvm::dyn_cast<WaitLoadcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitLoadcntOp WaitLoadcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  return create(builder, builder.getLoc(), resultTypes, count);
}

void WaitLoadcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint16_t count) {
  odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), count);
}

WaitLoadcntOp WaitLoadcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint16_t count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, count);
  auto __res__ = ::llvm::dyn_cast<WaitLoadcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitLoadcntOp WaitLoadcntOp::create(::mlir::ImplicitLocOpBuilder &builder, uint16_t count) {
  return create(builder, builder.getLoc(), count);
}

void WaitLoadcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint16_t count) {
  odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), count);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

WaitLoadcntOp WaitLoadcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint16_t count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, count);
  auto __res__ = ::llvm::dyn_cast<WaitLoadcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitLoadcntOp WaitLoadcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint16_t count) {
  return create(builder, builder.getLoc(), resultTypes, count);
}

void WaitLoadcntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<WaitLoadcntOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

WaitLoadcntOp WaitLoadcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<WaitLoadcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitLoadcntOp WaitLoadcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void WaitLoadcntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

WaitLoadcntOp WaitLoadcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<WaitLoadcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitLoadcntOp WaitLoadcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult WaitLoadcntOp::verifyInvariantsImpl() {
  auto tblgen_count = getProperties().count; (void)tblgen_count;
  if (!tblgen_count) return emitOpError("requires attribute 'count'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_count, "count")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult WaitLoadcntOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult WaitLoadcntOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr countAttr;

  if (parser.parseCustomAttributeWithFallback(countAttr, parser.getBuilder().getIntegerType(16))) {
    return ::mlir::failure();
  }
  if (countAttr) result.getOrAddProperties<WaitLoadcntOp::Properties>().count = countAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void WaitLoadcntOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getCountAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("count");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::WaitLoadcntOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::WaitStorecntOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

WaitStorecntOpGenericAdaptorBase::WaitStorecntOpGenericAdaptorBase(WaitStorecntOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint16_t WaitStorecntOpGenericAdaptorBase::getCount() {
  auto attr = getCountAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
WaitStorecntOpAdaptor::WaitStorecntOpAdaptor(WaitStorecntOp op) : WaitStorecntOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult WaitStorecntOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_count = getProperties().count; (void)tblgen_count;
  if (!tblgen_count) return emitError(loc, "'rocdl.s.wait.storecnt' op requires attribute 'count'");

  if (tblgen_count && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_count))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_count).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.s.wait.storecnt' op attribute 'count' failed to satisfy constraint: 16-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult WaitStorecntOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.count;
       auto attr = dict.get("count");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `count` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute WaitStorecntOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.count;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("count",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code WaitStorecntOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.count.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> WaitStorecntOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "count")
      return prop.count;
  return std::nullopt;
}

void WaitStorecntOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "count") {
       prop.count = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.count)>>(value);
       return;
    }
}

void WaitStorecntOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.count) attrs.append("count", prop.count);
}

::llvm::LogicalResult WaitStorecntOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getCountAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "count", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult WaitStorecntOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.count)))
    return ::mlir::failure();
  return ::mlir::success();
}

void WaitStorecntOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.count);
}

uint16_t WaitStorecntOp::getCount() {
  auto attr = getCountAttr();
  return attr.getValue().getZExtValue();
}

void WaitStorecntOp::setCount(uint16_t attrValue) {
  getProperties().count = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void WaitStorecntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count) {
  odsState.getOrAddProperties<Properties>().count = count;
}

WaitStorecntOp WaitStorecntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, count);
  auto __res__ = ::llvm::dyn_cast<WaitStorecntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitStorecntOp WaitStorecntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr count) {
  return create(builder, builder.getLoc(), count);
}

void WaitStorecntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  odsState.getOrAddProperties<Properties>().count = count;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

WaitStorecntOp WaitStorecntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, count);
  auto __res__ = ::llvm::dyn_cast<WaitStorecntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitStorecntOp WaitStorecntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  return create(builder, builder.getLoc(), resultTypes, count);
}

void WaitStorecntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint16_t count) {
  odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), count);
}

WaitStorecntOp WaitStorecntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint16_t count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, count);
  auto __res__ = ::llvm::dyn_cast<WaitStorecntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitStorecntOp WaitStorecntOp::create(::mlir::ImplicitLocOpBuilder &builder, uint16_t count) {
  return create(builder, builder.getLoc(), count);
}

void WaitStorecntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint16_t count) {
  odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), count);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

WaitStorecntOp WaitStorecntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint16_t count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, count);
  auto __res__ = ::llvm::dyn_cast<WaitStorecntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitStorecntOp WaitStorecntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint16_t count) {
  return create(builder, builder.getLoc(), resultTypes, count);
}

void WaitStorecntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<WaitStorecntOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

WaitStorecntOp WaitStorecntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<WaitStorecntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitStorecntOp WaitStorecntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void WaitStorecntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

WaitStorecntOp WaitStorecntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<WaitStorecntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitStorecntOp WaitStorecntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult WaitStorecntOp::verifyInvariantsImpl() {
  auto tblgen_count = getProperties().count; (void)tblgen_count;
  if (!tblgen_count) return emitOpError("requires attribute 'count'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_count, "count")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult WaitStorecntOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult WaitStorecntOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr countAttr;

  if (parser.parseCustomAttributeWithFallback(countAttr, parser.getBuilder().getIntegerType(16))) {
    return ::mlir::failure();
  }
  if (countAttr) result.getOrAddProperties<WaitStorecntOp::Properties>().count = countAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void WaitStorecntOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getCountAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("count");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::WaitStorecntOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::WaitTensorcntOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

WaitTensorcntOpGenericAdaptorBase::WaitTensorcntOpGenericAdaptorBase(WaitTensorcntOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint16_t WaitTensorcntOpGenericAdaptorBase::getCount() {
  auto attr = getCountAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
WaitTensorcntOpAdaptor::WaitTensorcntOpAdaptor(WaitTensorcntOp op) : WaitTensorcntOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult WaitTensorcntOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_count = getProperties().count; (void)tblgen_count;
  if (!tblgen_count) return emitError(loc, "'rocdl.s.wait.tensorcnt' op requires attribute 'count'");

  if (tblgen_count && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_count))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_count).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.s.wait.tensorcnt' op attribute 'count' failed to satisfy constraint: 16-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult WaitTensorcntOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.count;
       auto attr = dict.get("count");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `count` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute WaitTensorcntOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.count;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("count",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code WaitTensorcntOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.count.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> WaitTensorcntOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "count")
      return prop.count;
  return std::nullopt;
}

void WaitTensorcntOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "count") {
       prop.count = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.count)>>(value);
       return;
    }
}

void WaitTensorcntOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.count) attrs.append("count", prop.count);
}

::llvm::LogicalResult WaitTensorcntOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getCountAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "count", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult WaitTensorcntOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.count)))
    return ::mlir::failure();
  return ::mlir::success();
}

void WaitTensorcntOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.count);
}

uint16_t WaitTensorcntOp::getCount() {
  auto attr = getCountAttr();
  return attr.getValue().getZExtValue();
}

void WaitTensorcntOp::setCount(uint16_t attrValue) {
  getProperties().count = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void WaitTensorcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr count) {
  odsState.getOrAddProperties<Properties>().count = count;
}

WaitTensorcntOp WaitTensorcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, count);
  auto __res__ = ::llvm::dyn_cast<WaitTensorcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitTensorcntOp WaitTensorcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr count) {
  return create(builder, builder.getLoc(), count);
}

void WaitTensorcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  odsState.getOrAddProperties<Properties>().count = count;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

WaitTensorcntOp WaitTensorcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, count);
  auto __res__ = ::llvm::dyn_cast<WaitTensorcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitTensorcntOp WaitTensorcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr count) {
  return create(builder, builder.getLoc(), resultTypes, count);
}

void WaitTensorcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint16_t count) {
  odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), count);
}

WaitTensorcntOp WaitTensorcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint16_t count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, count);
  auto __res__ = ::llvm::dyn_cast<WaitTensorcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitTensorcntOp WaitTensorcntOp::create(::mlir::ImplicitLocOpBuilder &builder, uint16_t count) {
  return create(builder, builder.getLoc(), count);
}

void WaitTensorcntOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint16_t count) {
  odsState.getOrAddProperties<Properties>().count = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), count);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

WaitTensorcntOp WaitTensorcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint16_t count) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, count);
  auto __res__ = ::llvm::dyn_cast<WaitTensorcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitTensorcntOp WaitTensorcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint16_t count) {
  return create(builder, builder.getLoc(), resultTypes, count);
}

void WaitTensorcntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<WaitTensorcntOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

WaitTensorcntOp WaitTensorcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<WaitTensorcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitTensorcntOp WaitTensorcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void WaitTensorcntOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

WaitTensorcntOp WaitTensorcntOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<WaitTensorcntOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WaitTensorcntOp WaitTensorcntOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult WaitTensorcntOp::verifyInvariantsImpl() {
  auto tblgen_count = getProperties().count; (void)tblgen_count;
  if (!tblgen_count) return emitOpError("requires attribute 'count'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_count, "count")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult WaitTensorcntOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult WaitTensorcntOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr countAttr;

  if (parser.parseCustomAttributeWithFallback(countAttr, parser.getBuilder().getIntegerType(16))) {
    return ::mlir::failure();
  }
  if (countAttr) result.getOrAddProperties<WaitTensorcntOp::Properties>().count = countAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void WaitTensorcntOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getCountAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("count");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::WaitTensorcntOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::WavefrontSizeOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

WavefrontSizeOpGenericAdaptorBase::WavefrontSizeOpGenericAdaptorBase(WavefrontSizeOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional<::mlir::LLVM::ConstantRangeAttr> WavefrontSizeOpGenericAdaptorBase::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}


} // namespace detail
WavefrontSizeOpAdaptor::WavefrontSizeOpAdaptor(WavefrontSizeOp op) : WavefrontSizeOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult WavefrontSizeOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (tblgen_range && !((::llvm::isa<::mlir::LLVM::ConstantRangeAttr>(tblgen_range))))
    return emitError(loc, "'rocdl.wavefrontsize' op attribute 'range' failed to satisfy constraint: A range of two integers, corresponding to LLVM's ConstantRange");
  return ::mlir::success();
}

::llvm::LogicalResult WavefrontSizeOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.range;
       auto attr = dict.get("range");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `range` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute WavefrontSizeOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.range;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("range",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code WavefrontSizeOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.range.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> WavefrontSizeOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "range")
      return prop.range;
  return std::nullopt;
}

void WavefrontSizeOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "range") {
       prop.range = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.range)>>(value);
       return;
    }
}

void WavefrontSizeOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.range) attrs.append("range", prop.range);
}

::llvm::LogicalResult WavefrontSizeOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getRangeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(attr, "range", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult WavefrontSizeOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.range)))
    return ::mlir::failure();
  return ::mlir::success();
}

void WavefrontSizeOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.range);
}

::std::optional<::mlir::LLVM::ConstantRangeAttr> WavefrontSizeOp::getRange() {
  auto attr = getRangeAttr();
  return attr ? ::std::optional<::mlir::LLVM::ConstantRangeAttr>(::llvm::cast<::mlir::LLVM::ConstantRangeAttr>(attr)) : (::std::nullopt);
}

void WavefrontSizeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType) {
      build(odsBuilder, odsState, resultType, ::mlir::LLVM::ConstantRangeAttr{});
    
}

WavefrontSizeOp WavefrontSizeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultType);
  auto __res__ = ::llvm::dyn_cast<WavefrontSizeOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WavefrontSizeOp WavefrontSizeOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType) {
  return create(builder, builder.getLoc(), resultType);
}

void WavefrontSizeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  odsState.addTypes(res);
}

WavefrontSizeOp WavefrontSizeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, range);
  auto __res__ = ::llvm::dyn_cast<WavefrontSizeOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WavefrontSizeOp WavefrontSizeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), res, range);
}

void WavefrontSizeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  if (range) {
    odsState.getOrAddProperties<Properties>().range = range;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

WavefrontSizeOp WavefrontSizeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, range);
  auto __res__ = ::llvm::dyn_cast<WavefrontSizeOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WavefrontSizeOp WavefrontSizeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, /*optional*/::mlir::LLVM::ConstantRangeAttr range) {
  return create(builder, builder.getLoc(), resultTypes, range);
}

void WavefrontSizeOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<WavefrontSizeOp::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

WavefrontSizeOp WavefrontSizeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<WavefrontSizeOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WavefrontSizeOp WavefrontSizeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void WavefrontSizeOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

WavefrontSizeOp WavefrontSizeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<WavefrontSizeOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

WavefrontSizeOp WavefrontSizeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult WavefrontSizeOp::verifyInvariantsImpl() {
  auto tblgen_range = getProperties().range; (void)tblgen_range;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps3(*this, tblgen_range, "range")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult WavefrontSizeOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult WavefrontSizeOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::LLVM::ConstantRangeAttr rangeAttr;
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
  if (::mlir::succeeded(parser.parseOptionalKeyword("range"))) {

  if (parser.parseCustomAttributeWithFallback(rangeAttr, ::mlir::Type{})) {
    return ::mlir::failure();
  }
  if (rangeAttr) result.getOrAddProperties<WavefrontSizeOp::Properties>().range = rangeAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  return ::mlir::success();
}

void WavefrontSizeOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getRangeAttr()) {
    _odsPrinter << ' ' << "range";
    _odsPrinter << ' ';
  _odsPrinter.printStrippedAttrOrType(getRangeAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("range");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void WavefrontSizeOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::WavefrontSizeOp)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::ds_read_tr16_b64 definitions
//===----------------------------------------------------------------------===//

namespace detail {

ds_read_tr16_b64GenericAdaptorBase::ds_read_tr16_b64GenericAdaptorBase(ds_read_tr16_b64 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > ds_read_tr16_b64GenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr16_b64GenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr16_b64GenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
ds_read_tr16_b64Adaptor::ds_read_tr16_b64Adaptor(ds_read_tr16_b64 op) : ds_read_tr16_b64GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ds_read_tr16_b64Adaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.read.tr16.b64' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.read.tr16.b64' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.read.tr16.b64' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult ds_read_tr16_b64::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ds_read_tr16_b64::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ds_read_tr16_b64::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ds_read_tr16_b64::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void ds_read_tr16_b64::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void ds_read_tr16_b64::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult ds_read_tr16_b64::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ds_read_tr16_b64::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ds_read_tr16_b64::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr16_b64::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr16_b64::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr16_b64::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void ds_read_tr16_b64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  odsState.addTypes(res);
}

ds_read_tr16_b64 ds_read_tr16_b64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr16_b64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr16_b64 ds_read_tr16_b64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), res, ptr, alias_scopes, noalias_scopes, tbaa);
}

void ds_read_tr16_b64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ds_read_tr16_b64 ds_read_tr16_b64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr16_b64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr16_b64 ds_read_tr16_b64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
}

void ds_read_tr16_b64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<ds_read_tr16_b64::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ds_read_tr16_b64 ds_read_tr16_b64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr16_b64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr16_b64 ds_read_tr16_b64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void ds_read_tr16_b64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ds_read_tr16_b64 ds_read_tr16_b64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr16_b64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr16_b64 ds_read_tr16_b64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult ds_read_tr16_b64::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult ds_read_tr16_b64::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ds_read_tr16_b64::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::Type ptrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ptrTypes(&ptrRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    ptrRawType = type;
  }
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(ptrOperands, ptrTypes, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void ds_read_tr16_b64::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getPtr().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void ds_read_tr16_b64::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> ds_read_tr16_b64::getAccessedOperands() {
  return {getPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::ds_read_tr16_b64)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::ds_read_tr4_b64 definitions
//===----------------------------------------------------------------------===//

namespace detail {

ds_read_tr4_b64GenericAdaptorBase::ds_read_tr4_b64GenericAdaptorBase(ds_read_tr4_b64 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > ds_read_tr4_b64GenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr4_b64GenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr4_b64GenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
ds_read_tr4_b64Adaptor::ds_read_tr4_b64Adaptor(ds_read_tr4_b64 op) : ds_read_tr4_b64GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ds_read_tr4_b64Adaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.read.tr4.b64' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.read.tr4.b64' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.read.tr4.b64' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult ds_read_tr4_b64::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ds_read_tr4_b64::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ds_read_tr4_b64::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ds_read_tr4_b64::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void ds_read_tr4_b64::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void ds_read_tr4_b64::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult ds_read_tr4_b64::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ds_read_tr4_b64::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ds_read_tr4_b64::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr4_b64::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr4_b64::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr4_b64::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void ds_read_tr4_b64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  odsState.addTypes(res);
}

ds_read_tr4_b64 ds_read_tr4_b64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr4_b64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr4_b64 ds_read_tr4_b64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), res, ptr, alias_scopes, noalias_scopes, tbaa);
}

void ds_read_tr4_b64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ds_read_tr4_b64 ds_read_tr4_b64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr4_b64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr4_b64 ds_read_tr4_b64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
}

void ds_read_tr4_b64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<ds_read_tr4_b64::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ds_read_tr4_b64 ds_read_tr4_b64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr4_b64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr4_b64 ds_read_tr4_b64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void ds_read_tr4_b64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ds_read_tr4_b64 ds_read_tr4_b64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr4_b64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr4_b64 ds_read_tr4_b64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult ds_read_tr4_b64::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult ds_read_tr4_b64::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ds_read_tr4_b64::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::Type ptrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ptrTypes(&ptrRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    ptrRawType = type;
  }
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(ptrOperands, ptrTypes, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void ds_read_tr4_b64::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getPtr().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void ds_read_tr4_b64::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> ds_read_tr4_b64::getAccessedOperands() {
  return {getPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::ds_read_tr4_b64)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::ds_read_tr6_b96 definitions
//===----------------------------------------------------------------------===//

namespace detail {

ds_read_tr6_b96GenericAdaptorBase::ds_read_tr6_b96GenericAdaptorBase(ds_read_tr6_b96 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > ds_read_tr6_b96GenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr6_b96GenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr6_b96GenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
ds_read_tr6_b96Adaptor::ds_read_tr6_b96Adaptor(ds_read_tr6_b96 op) : ds_read_tr6_b96GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ds_read_tr6_b96Adaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.read.tr6.b96' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.read.tr6.b96' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.read.tr6.b96' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult ds_read_tr6_b96::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ds_read_tr6_b96::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ds_read_tr6_b96::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ds_read_tr6_b96::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void ds_read_tr6_b96::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void ds_read_tr6_b96::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult ds_read_tr6_b96::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ds_read_tr6_b96::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ds_read_tr6_b96::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr6_b96::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr6_b96::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr6_b96::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void ds_read_tr6_b96::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  odsState.addTypes(res);
}

ds_read_tr6_b96 ds_read_tr6_b96::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr6_b96>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr6_b96 ds_read_tr6_b96::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), res, ptr, alias_scopes, noalias_scopes, tbaa);
}

void ds_read_tr6_b96::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ds_read_tr6_b96 ds_read_tr6_b96::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr6_b96>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr6_b96 ds_read_tr6_b96::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
}

void ds_read_tr6_b96::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<ds_read_tr6_b96::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ds_read_tr6_b96 ds_read_tr6_b96::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr6_b96>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr6_b96 ds_read_tr6_b96::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void ds_read_tr6_b96::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ds_read_tr6_b96 ds_read_tr6_b96::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr6_b96>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr6_b96 ds_read_tr6_b96::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult ds_read_tr6_b96::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult ds_read_tr6_b96::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ds_read_tr6_b96::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::Type ptrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ptrTypes(&ptrRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    ptrRawType = type;
  }
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(ptrOperands, ptrTypes, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void ds_read_tr6_b96::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getPtr().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void ds_read_tr6_b96::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> ds_read_tr6_b96::getAccessedOperands() {
  return {getPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::ds_read_tr6_b96)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::ds_read_tr8_b64 definitions
//===----------------------------------------------------------------------===//

namespace detail {

ds_read_tr8_b64GenericAdaptorBase::ds_read_tr8_b64GenericAdaptorBase(ds_read_tr8_b64 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::std::optional< ::mlir::ArrayAttr > ds_read_tr8_b64GenericAdaptorBase::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr8_b64GenericAdaptorBase::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr8_b64GenericAdaptorBase::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}


} // namespace detail
ds_read_tr8_b64Adaptor::ds_read_tr8_b64Adaptor(ds_read_tr8_b64 op) : ds_read_tr8_b64GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ds_read_tr8_b64Adaptor::verify(::mlir::Location loc) {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_alias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_alias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.read.tr8.b64' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_noalias_scopes))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_noalias_scopes), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.read.tr8.b64' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");

  if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_tbaa))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_tbaa), [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(attr))); }))))
    return emitError(loc, "'rocdl.ds.read.tr8.b64' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
  return ::mlir::success();
}

::llvm::LogicalResult ds_read_tr8_b64::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.alias_scopes;
       auto attr = dict.get("alias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.noalias_scopes;
       auto attr = dict.get("noalias_scopes");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.tbaa;
       auto attr = dict.get("tbaa");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ds_read_tr8_b64::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.alias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("alias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.noalias_scopes;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("noalias_scopes",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.tbaa;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("tbaa",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ds_read_tr8_b64::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.alias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.noalias_scopes.getAsOpaquePointer()), 
    llvm::hash_value(prop.tbaa.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ds_read_tr8_b64::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "alias_scopes")
      return prop.alias_scopes;

    if (name == "noalias_scopes")
      return prop.noalias_scopes;

    if (name == "tbaa")
      return prop.tbaa;
  return std::nullopt;
}

void ds_read_tr8_b64::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "alias_scopes") {
       prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(value);
       return;
    }

    if (name == "noalias_scopes") {
       prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(value);
       return;
    }

    if (name == "tbaa") {
       prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(value);
       return;
    }
}

void ds_read_tr8_b64::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.alias_scopes) attrs.append("alias_scopes", prop.alias_scopes);

    if (prop.noalias_scopes) attrs.append("noalias_scopes", prop.noalias_scopes);

    if (prop.tbaa) attrs.append("tbaa", prop.tbaa);
}

::llvm::LogicalResult ds_read_tr8_b64::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "alias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getNoaliasScopesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(attr, "noalias_scopes", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getTbaaAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(attr, "tbaa", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ds_read_tr8_b64::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.alias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.noalias_scopes)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.tbaa)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ds_read_tr8_b64::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.alias_scopes);

  writer.writeOptionalAttribute(prop.noalias_scopes);

  writer.writeOptionalAttribute(prop.tbaa);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr8_b64::getAliasScopes() {
  auto attr = getAliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr8_b64::getNoaliasScopes() {
  auto attr = getNoaliasScopesAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

::std::optional< ::mlir::ArrayAttr > ds_read_tr8_b64::getTbaa() {
  auto attr = getTbaaAttr();
  return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
}

void ds_read_tr8_b64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  odsState.addTypes(res);
}

ds_read_tr8_b64 ds_read_tr8_b64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr8_b64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr8_b64 ds_read_tr8_b64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), res, ptr, alias_scopes, noalias_scopes, tbaa);
}

void ds_read_tr8_b64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  odsState.addOperands(ptr);
  if (alias_scopes) {
    odsState.getOrAddProperties<Properties>().alias_scopes = alias_scopes;
  }
  if (noalias_scopes) {
    odsState.getOrAddProperties<Properties>().noalias_scopes = noalias_scopes;
  }
  if (tbaa) {
    odsState.getOrAddProperties<Properties>().tbaa = tbaa;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ds_read_tr8_b64 ds_read_tr8_b64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr8_b64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr8_b64 ds_read_tr8_b64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
  return create(builder, builder.getLoc(), resultTypes, ptr, alias_scopes, noalias_scopes, tbaa);
}

void ds_read_tr8_b64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<ds_read_tr8_b64::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ds_read_tr8_b64 ds_read_tr8_b64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr8_b64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr8_b64 ds_read_tr8_b64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void ds_read_tr8_b64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 1u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ds_read_tr8_b64 ds_read_tr8_b64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<ds_read_tr8_b64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ds_read_tr8_b64 ds_read_tr8_b64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult ds_read_tr8_b64::verifyInvariantsImpl() {
  auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
  auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
  auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_alias_scopes, "alias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps5(*this, tblgen_noalias_scopes, "noalias_scopes")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps6(*this, tblgen_tbaa, "tbaa")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps3(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult ds_read_tr8_b64::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ds_read_tr8_b64::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand ptrRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrOperands(&ptrRawOperand, 1);  ::llvm::SMLoc ptrOperandsLoc;
  (void)ptrOperandsLoc;
  ::mlir::Type ptrRawType{};
  ::llvm::ArrayRef<::mlir::Type> ptrTypes(&ptrRawType, 1);
  ::mlir::Type resRawType{};
  ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);

  ptrOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(ptrRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  {
    ::mlir::LLVM::LLVMPointerType type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    ptrRawType = type;
  }
  if (parser.parseArrow())
    return ::mlir::failure();

  {
    ::mlir::Type type;
    if (parser.parseCustomTypeWithFallback(type))
      return ::mlir::failure();
    resRawType = type;
  }
  result.addTypes(resTypes);
  if (parser.resolveOperands(ptrOperands, ptrTypes, ptrOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void ds_read_tr8_b64::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getPtr();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  {
    auto type = getPtr().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::LLVM::LLVMPointerType>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
  _odsPrinter << ' ' << "->";
  _odsPrinter << ' ';
  {
    auto type = getRes().getType();
    if (auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
      _odsPrinter.printStrippedAttrOrType(validType);
   else
     _odsPrinter << type;
  }
}

void ds_read_tr8_b64::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
  {
    auto valueRange = getODSOperandIndexAndLength(0);
    for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
      effects.emplace_back(::mlir::MemoryEffects::Read::get(), &getOperation()->getOpOperand(idx), 0, false, ::mlir::SideEffects::DefaultResource::get());
    }
  }
}

::llvm::SmallVector<::mlir::Value> ds_read_tr8_b64::getAccessedOperands() {
  return {getPtr()};
}

} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::ds_read_tr8_b64)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x16bf16_1k definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x16bf16_1kGenericAdaptorBase::mfma_f32_16x16x16bf16_1kGenericAdaptorBase(mfma_f32_16x16x16bf16_1k op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x16bf16_1kGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x16bf16_1kAdaptor::mfma_f32_16x16x16bf16_1kAdaptor(mfma_f32_16x16x16bf16_1k op) : mfma_f32_16x16x16bf16_1kGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x16bf16_1kAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x16bf16_1k::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x16bf16_1k::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x16bf16_1k::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x16bf16_1k::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x16bf16_1k::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x16bf16_1k::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x16bf16_1k::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x16bf16_1k::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x16bf16_1k::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x16bf16_1k::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x16bf16_1k mfma_f32_16x16x16bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x16bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x16bf16_1k mfma_f32_16x16x16bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x16bf16_1k::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x16bf16_1k mfma_f32_16x16x16bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x16bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x16bf16_1k mfma_f32_16x16x16bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x16bf16_1k::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x16bf16_1k mfma_f32_16x16x16bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x16bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x16bf16_1k mfma_f32_16x16x16bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x16bf16_1k::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x16bf16_1k::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x16bf16_1k::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x16bf16_1k::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x16bf16_1k)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x16f16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x16f16GenericAdaptorBase::mfma_f32_16x16x16f16GenericAdaptorBase(mfma_f32_16x16x16f16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x16f16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x16f16Adaptor::mfma_f32_16x16x16f16Adaptor(mfma_f32_16x16x16f16 op) : mfma_f32_16x16x16f16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x16f16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x16f16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x16f16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x16f16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x16f16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x16f16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x16f16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x16f16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x16f16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x16f16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x16f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x16f16 mfma_f32_16x16x16f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x16f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x16f16 mfma_f32_16x16x16f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x16f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x16f16 mfma_f32_16x16x16f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x16f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x16f16 mfma_f32_16x16x16f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x16f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x16f16 mfma_f32_16x16x16f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x16f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x16f16 mfma_f32_16x16x16f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x16f16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x16f16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x16f16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x16f16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x16f16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x1f32 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x1f32GenericAdaptorBase::mfma_f32_16x16x1f32GenericAdaptorBase(mfma_f32_16x16x1f32 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x1f32GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x1f32Adaptor::mfma_f32_16x16x1f32Adaptor(mfma_f32_16x16x1f32 op) : mfma_f32_16x16x1f32GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x1f32Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x1f32::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x1f32::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x1f32::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x1f32::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x1f32::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x1f32::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x1f32::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x1f32::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x1f32::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x1f32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x1f32 mfma_f32_16x16x1f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x1f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x1f32 mfma_f32_16x16x1f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x1f32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x1f32 mfma_f32_16x16x1f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x1f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x1f32 mfma_f32_16x16x1f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x1f32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x1f32 mfma_f32_16x16x1f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x1f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x1f32 mfma_f32_16x16x1f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x1f32::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x1f32::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x1f32::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x1f32::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x1f32)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x2bf16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x2bf16GenericAdaptorBase::mfma_f32_16x16x2bf16GenericAdaptorBase(mfma_f32_16x16x2bf16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x2bf16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x2bf16Adaptor::mfma_f32_16x16x2bf16Adaptor(mfma_f32_16x16x2bf16 op) : mfma_f32_16x16x2bf16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x2bf16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x2bf16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x2bf16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x2bf16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x2bf16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x2bf16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x2bf16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x2bf16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x2bf16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x2bf16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x2bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x2bf16 mfma_f32_16x16x2bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x2bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x2bf16 mfma_f32_16x16x2bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x2bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x2bf16 mfma_f32_16x16x2bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x2bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x2bf16 mfma_f32_16x16x2bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x2bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x2bf16 mfma_f32_16x16x2bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x2bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x2bf16 mfma_f32_16x16x2bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x2bf16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x2bf16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x2bf16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x2bf16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x2bf16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x32_bf16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x32_bf16GenericAdaptorBase::mfma_f32_16x16x32_bf16GenericAdaptorBase(mfma_f32_16x16x32_bf16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x32_bf16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x32_bf16Adaptor::mfma_f32_16x16x32_bf16Adaptor(mfma_f32_16x16x32_bf16 op) : mfma_f32_16x16x32_bf16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x32_bf16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x32_bf16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x32_bf16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x32_bf16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x32_bf16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x32_bf16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x32_bf16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x32_bf16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x32_bf16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x32_bf16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x32_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x32_bf16 mfma_f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_bf16 mfma_f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x32_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x32_bf16 mfma_f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_bf16 mfma_f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x32_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x32_bf16 mfma_f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_bf16 mfma_f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x32_bf16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x32_bf16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x32_bf16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x32_bf16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x32_bf16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x32_bf8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x32_bf8_bf8GenericAdaptorBase::mfma_f32_16x16x32_bf8_bf8GenericAdaptorBase(mfma_f32_16x16x32_bf8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x32_bf8_bf8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x32_bf8_bf8Adaptor::mfma_f32_16x16x32_bf8_bf8Adaptor(mfma_f32_16x16x32_bf8_bf8 op) : mfma_f32_16x16x32_bf8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x32_bf8_bf8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x32_bf8_bf8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x32_bf8_bf8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x32_bf8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x32_bf8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x32_bf8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x32_bf8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x32_bf8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x32_bf8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x32_bf8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x32_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x32_bf8_bf8 mfma_f32_16x16x32_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_bf8_bf8 mfma_f32_16x16x32_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x32_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x32_bf8_bf8 mfma_f32_16x16x32_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_bf8_bf8 mfma_f32_16x16x32_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x32_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x32_bf8_bf8 mfma_f32_16x16x32_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_bf8_bf8 mfma_f32_16x16x32_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x32_bf8_bf8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x32_bf8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x32_bf8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x32_bf8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x32_bf8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x32_bf8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x32_bf8_fp8GenericAdaptorBase::mfma_f32_16x16x32_bf8_fp8GenericAdaptorBase(mfma_f32_16x16x32_bf8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x32_bf8_fp8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x32_bf8_fp8Adaptor::mfma_f32_16x16x32_bf8_fp8Adaptor(mfma_f32_16x16x32_bf8_fp8 op) : mfma_f32_16x16x32_bf8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x32_bf8_fp8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x32_bf8_fp8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x32_bf8_fp8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x32_bf8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x32_bf8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x32_bf8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x32_bf8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x32_bf8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x32_bf8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x32_bf8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x32_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x32_bf8_fp8 mfma_f32_16x16x32_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_bf8_fp8 mfma_f32_16x16x32_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x32_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x32_bf8_fp8 mfma_f32_16x16x32_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_bf8_fp8 mfma_f32_16x16x32_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x32_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x32_bf8_fp8 mfma_f32_16x16x32_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_bf8_fp8 mfma_f32_16x16x32_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x32_bf8_fp8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x32_bf8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x32_bf8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x32_bf8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x32_bf8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x32_f16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x32_f16GenericAdaptorBase::mfma_f32_16x16x32_f16GenericAdaptorBase(mfma_f32_16x16x32_f16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x32_f16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x32_f16Adaptor::mfma_f32_16x16x32_f16Adaptor(mfma_f32_16x16x32_f16 op) : mfma_f32_16x16x32_f16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x32_f16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x32_f16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x32_f16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x32_f16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x32_f16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x32_f16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x32_f16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x32_f16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x32_f16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x32_f16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x32_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x32_f16 mfma_f32_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_f16 mfma_f32_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x32_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x32_f16 mfma_f32_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_f16 mfma_f32_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x32_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x32_f16 mfma_f32_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_f16 mfma_f32_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x32_f16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x32_f16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x32_f16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x32_f16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x32_f16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x32_fp8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x32_fp8_bf8GenericAdaptorBase::mfma_f32_16x16x32_fp8_bf8GenericAdaptorBase(mfma_f32_16x16x32_fp8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x32_fp8_bf8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x32_fp8_bf8Adaptor::mfma_f32_16x16x32_fp8_bf8Adaptor(mfma_f32_16x16x32_fp8_bf8 op) : mfma_f32_16x16x32_fp8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x32_fp8_bf8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x32_fp8_bf8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x32_fp8_bf8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x32_fp8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x32_fp8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x32_fp8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x32_fp8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x32_fp8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x32_fp8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x32_fp8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x32_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x32_fp8_bf8 mfma_f32_16x16x32_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_fp8_bf8 mfma_f32_16x16x32_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x32_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x32_fp8_bf8 mfma_f32_16x16x32_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_fp8_bf8 mfma_f32_16x16x32_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x32_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x32_fp8_bf8 mfma_f32_16x16x32_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_fp8_bf8 mfma_f32_16x16x32_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x32_fp8_bf8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x32_fp8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x32_fp8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x32_fp8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x32_fp8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x32_fp8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x32_fp8_fp8GenericAdaptorBase::mfma_f32_16x16x32_fp8_fp8GenericAdaptorBase(mfma_f32_16x16x32_fp8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x32_fp8_fp8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x32_fp8_fp8Adaptor::mfma_f32_16x16x32_fp8_fp8Adaptor(mfma_f32_16x16x32_fp8_fp8 op) : mfma_f32_16x16x32_fp8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x32_fp8_fp8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x32_fp8_fp8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x32_fp8_fp8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x32_fp8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x32_fp8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x32_fp8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x32_fp8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x32_fp8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x32_fp8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x32_fp8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x32_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x32_fp8_fp8 mfma_f32_16x16x32_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_fp8_fp8 mfma_f32_16x16x32_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x32_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x32_fp8_fp8 mfma_f32_16x16x32_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_fp8_fp8 mfma_f32_16x16x32_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x32_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x32_fp8_fp8 mfma_f32_16x16x32_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x32_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x32_fp8_fp8 mfma_f32_16x16x32_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x32_fp8_fp8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x32_fp8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x32_fp8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x32_fp8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x32_fp8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x4bf16_1k definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x4bf16_1kGenericAdaptorBase::mfma_f32_16x16x4bf16_1kGenericAdaptorBase(mfma_f32_16x16x4bf16_1k op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x4bf16_1kGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x4bf16_1kAdaptor::mfma_f32_16x16x4bf16_1kAdaptor(mfma_f32_16x16x4bf16_1k op) : mfma_f32_16x16x4bf16_1kGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x4bf16_1kAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x4bf16_1k::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x4bf16_1k::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x4bf16_1k::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x4bf16_1k::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x4bf16_1k::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x4bf16_1k::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x4bf16_1k::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x4bf16_1k::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x4bf16_1k::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x4bf16_1k::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x4bf16_1k mfma_f32_16x16x4bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x4bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x4bf16_1k mfma_f32_16x16x4bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x4bf16_1k::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x4bf16_1k mfma_f32_16x16x4bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x4bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x4bf16_1k mfma_f32_16x16x4bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x4bf16_1k::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x4bf16_1k mfma_f32_16x16x4bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x4bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x4bf16_1k mfma_f32_16x16x4bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x4bf16_1k::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x4bf16_1k::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x4bf16_1k::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x4bf16_1k::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x4bf16_1k)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x4f16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x4f16GenericAdaptorBase::mfma_f32_16x16x4f16GenericAdaptorBase(mfma_f32_16x16x4f16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x4f16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x4f16Adaptor::mfma_f32_16x16x4f16Adaptor(mfma_f32_16x16x4f16 op) : mfma_f32_16x16x4f16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x4f16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x4f16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x4f16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x4f16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x4f16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x4f16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x4f16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x4f16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x4f16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x4f16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x4f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x4f16 mfma_f32_16x16x4f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x4f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x4f16 mfma_f32_16x16x4f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x4f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x4f16 mfma_f32_16x16x4f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x4f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x4f16 mfma_f32_16x16x4f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x4f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x4f16 mfma_f32_16x16x4f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x4f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x4f16 mfma_f32_16x16x4f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x4f16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x4f16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x4f16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x4f16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x4f16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x4f32 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x4f32GenericAdaptorBase::mfma_f32_16x16x4f32GenericAdaptorBase(mfma_f32_16x16x4f32 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x4f32GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x4f32Adaptor::mfma_f32_16x16x4f32Adaptor(mfma_f32_16x16x4f32 op) : mfma_f32_16x16x4f32GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x4f32Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x4f32::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x4f32::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x4f32::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x4f32::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x4f32::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x4f32::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x4f32::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x4f32::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x4f32::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x4f32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x4f32 mfma_f32_16x16x4f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x4f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x4f32 mfma_f32_16x16x4f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x4f32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x4f32 mfma_f32_16x16x4f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x4f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x4f32 mfma_f32_16x16x4f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x4f32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x4f32 mfma_f32_16x16x4f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x4f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x4f32 mfma_f32_16x16x4f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x4f32::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x4f32::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x4f32::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x4f32::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x4f32)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x8_xf32 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x8_xf32GenericAdaptorBase::mfma_f32_16x16x8_xf32GenericAdaptorBase(mfma_f32_16x16x8_xf32 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x8_xf32GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x8_xf32Adaptor::mfma_f32_16x16x8_xf32Adaptor(mfma_f32_16x16x8_xf32 op) : mfma_f32_16x16x8_xf32GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x8_xf32Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x8_xf32::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x8_xf32::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x8_xf32::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x8_xf32::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x8_xf32::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x8_xf32::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x8_xf32::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x8_xf32::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x8_xf32::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x8_xf32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x8_xf32 mfma_f32_16x16x8_xf32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x8_xf32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x8_xf32 mfma_f32_16x16x8_xf32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x8_xf32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x8_xf32 mfma_f32_16x16x8_xf32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x8_xf32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x8_xf32 mfma_f32_16x16x8_xf32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x8_xf32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x8_xf32 mfma_f32_16x16x8_xf32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x8_xf32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x8_xf32 mfma_f32_16x16x8_xf32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x8_xf32::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x8_xf32::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x8_xf32::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x8_xf32::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x8_xf32)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_16x16x8bf16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_16x16x8bf16GenericAdaptorBase::mfma_f32_16x16x8bf16GenericAdaptorBase(mfma_f32_16x16x8bf16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_16x16x8bf16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_16x16x8bf16Adaptor::mfma_f32_16x16x8bf16Adaptor(mfma_f32_16x16x8bf16 op) : mfma_f32_16x16x8bf16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_16x16x8bf16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_16x16x8bf16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_16x16x8bf16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_16x16x8bf16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_16x16x8bf16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_16x16x8bf16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_16x16x8bf16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_16x16x8bf16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_16x16x8bf16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_16x16x8bf16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_16x16x8bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_16x16x8bf16 mfma_f32_16x16x8bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x8bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x8bf16 mfma_f32_16x16x8bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_16x16x8bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x8bf16 mfma_f32_16x16x8bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x8bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x8bf16 mfma_f32_16x16x8bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_16x16x8bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_16x16x8bf16 mfma_f32_16x16x8bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_16x16x8bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_16x16x8bf16 mfma_f32_16x16x8bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_16x16x8bf16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_16x16x8bf16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_16x16x8bf16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_16x16x8bf16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_16x16x8bf16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x16_bf16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x16_bf16GenericAdaptorBase::mfma_f32_32x32x16_bf16GenericAdaptorBase(mfma_f32_32x32x16_bf16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x16_bf16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x16_bf16Adaptor::mfma_f32_32x32x16_bf16Adaptor(mfma_f32_32x32x16_bf16 op) : mfma_f32_32x32x16_bf16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x16_bf16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x16_bf16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x16_bf16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x16_bf16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x16_bf16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x16_bf16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x16_bf16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x16_bf16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x16_bf16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x16_bf16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x16_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x16_bf16 mfma_f32_32x32x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_bf16 mfma_f32_32x32x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x16_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x16_bf16 mfma_f32_32x32x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_bf16 mfma_f32_32x32x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x16_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x16_bf16 mfma_f32_32x32x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_bf16 mfma_f32_32x32x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x16_bf16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x16_bf16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x16_bf16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x16_bf16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x16_bf16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x16_bf8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x16_bf8_bf8GenericAdaptorBase::mfma_f32_32x32x16_bf8_bf8GenericAdaptorBase(mfma_f32_32x32x16_bf8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x16_bf8_bf8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x16_bf8_bf8Adaptor::mfma_f32_32x32x16_bf8_bf8Adaptor(mfma_f32_32x32x16_bf8_bf8 op) : mfma_f32_32x32x16_bf8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x16_bf8_bf8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x16_bf8_bf8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x16_bf8_bf8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x16_bf8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x16_bf8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x16_bf8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x16_bf8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x16_bf8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x16_bf8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x16_bf8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x16_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x16_bf8_bf8 mfma_f32_32x32x16_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_bf8_bf8 mfma_f32_32x32x16_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x16_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x16_bf8_bf8 mfma_f32_32x32x16_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_bf8_bf8 mfma_f32_32x32x16_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x16_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x16_bf8_bf8 mfma_f32_32x32x16_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_bf8_bf8 mfma_f32_32x32x16_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x16_bf8_bf8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x16_bf8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x16_bf8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x16_bf8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x16_bf8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x16_bf8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x16_bf8_fp8GenericAdaptorBase::mfma_f32_32x32x16_bf8_fp8GenericAdaptorBase(mfma_f32_32x32x16_bf8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x16_bf8_fp8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x16_bf8_fp8Adaptor::mfma_f32_32x32x16_bf8_fp8Adaptor(mfma_f32_32x32x16_bf8_fp8 op) : mfma_f32_32x32x16_bf8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x16_bf8_fp8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x16_bf8_fp8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x16_bf8_fp8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x16_bf8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x16_bf8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x16_bf8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x16_bf8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x16_bf8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x16_bf8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x16_bf8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x16_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x16_bf8_fp8 mfma_f32_32x32x16_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_bf8_fp8 mfma_f32_32x32x16_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x16_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x16_bf8_fp8 mfma_f32_32x32x16_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_bf8_fp8 mfma_f32_32x32x16_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x16_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x16_bf8_fp8 mfma_f32_32x32x16_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_bf8_fp8 mfma_f32_32x32x16_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x16_bf8_fp8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x16_bf8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x16_bf8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x16_bf8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x16_bf8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x16_f16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x16_f16GenericAdaptorBase::mfma_f32_32x32x16_f16GenericAdaptorBase(mfma_f32_32x32x16_f16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x16_f16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x16_f16Adaptor::mfma_f32_32x32x16_f16Adaptor(mfma_f32_32x32x16_f16 op) : mfma_f32_32x32x16_f16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x16_f16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x16_f16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x16_f16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x16_f16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x16_f16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x16_f16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x16_f16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x16_f16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x16_f16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x16_f16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x16_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x16_f16 mfma_f32_32x32x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_f16 mfma_f32_32x32x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x16_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x16_f16 mfma_f32_32x32x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_f16 mfma_f32_32x32x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x16_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x16_f16 mfma_f32_32x32x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_f16 mfma_f32_32x32x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x16_f16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x16_f16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x16_f16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x16_f16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x16_f16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x16_fp8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x16_fp8_bf8GenericAdaptorBase::mfma_f32_32x32x16_fp8_bf8GenericAdaptorBase(mfma_f32_32x32x16_fp8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x16_fp8_bf8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x16_fp8_bf8Adaptor::mfma_f32_32x32x16_fp8_bf8Adaptor(mfma_f32_32x32x16_fp8_bf8 op) : mfma_f32_32x32x16_fp8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x16_fp8_bf8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x16_fp8_bf8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x16_fp8_bf8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x16_fp8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x16_fp8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x16_fp8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x16_fp8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x16_fp8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x16_fp8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x16_fp8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x16_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x16_fp8_bf8 mfma_f32_32x32x16_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_fp8_bf8 mfma_f32_32x32x16_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x16_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x16_fp8_bf8 mfma_f32_32x32x16_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_fp8_bf8 mfma_f32_32x32x16_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x16_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x16_fp8_bf8 mfma_f32_32x32x16_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_fp8_bf8 mfma_f32_32x32x16_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x16_fp8_bf8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x16_fp8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x16_fp8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x16_fp8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x16_fp8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x16_fp8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x16_fp8_fp8GenericAdaptorBase::mfma_f32_32x32x16_fp8_fp8GenericAdaptorBase(mfma_f32_32x32x16_fp8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x16_fp8_fp8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x16_fp8_fp8Adaptor::mfma_f32_32x32x16_fp8_fp8Adaptor(mfma_f32_32x32x16_fp8_fp8 op) : mfma_f32_32x32x16_fp8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x16_fp8_fp8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x16_fp8_fp8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x16_fp8_fp8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x16_fp8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x16_fp8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x16_fp8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x16_fp8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x16_fp8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x16_fp8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x16_fp8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x16_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x16_fp8_fp8 mfma_f32_32x32x16_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_fp8_fp8 mfma_f32_32x32x16_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x16_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x16_fp8_fp8 mfma_f32_32x32x16_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_fp8_fp8 mfma_f32_32x32x16_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x16_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x16_fp8_fp8 mfma_f32_32x32x16_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x16_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x16_fp8_fp8 mfma_f32_32x32x16_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x16_fp8_fp8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x16_fp8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x16_fp8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x16_fp8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x16_fp8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x1f32 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x1f32GenericAdaptorBase::mfma_f32_32x32x1f32GenericAdaptorBase(mfma_f32_32x32x1f32 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x1f32GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x1f32Adaptor::mfma_f32_32x32x1f32Adaptor(mfma_f32_32x32x1f32 op) : mfma_f32_32x32x1f32GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x1f32Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x1f32::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x1f32::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x1f32::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x1f32::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x1f32::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x1f32::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x1f32::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x1f32::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x1f32::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x1f32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x1f32 mfma_f32_32x32x1f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x1f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x1f32 mfma_f32_32x32x1f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x1f32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x1f32 mfma_f32_32x32x1f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x1f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x1f32 mfma_f32_32x32x1f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x1f32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x1f32 mfma_f32_32x32x1f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x1f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x1f32 mfma_f32_32x32x1f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x1f32::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x1f32::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x1f32::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x1f32::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x1f32)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x2bf16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x2bf16GenericAdaptorBase::mfma_f32_32x32x2bf16GenericAdaptorBase(mfma_f32_32x32x2bf16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x2bf16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x2bf16Adaptor::mfma_f32_32x32x2bf16Adaptor(mfma_f32_32x32x2bf16 op) : mfma_f32_32x32x2bf16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x2bf16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x2bf16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x2bf16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x2bf16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x2bf16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x2bf16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x2bf16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x2bf16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x2bf16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x2bf16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x2bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x2bf16 mfma_f32_32x32x2bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x2bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x2bf16 mfma_f32_32x32x2bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x2bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x2bf16 mfma_f32_32x32x2bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x2bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x2bf16 mfma_f32_32x32x2bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x2bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x2bf16 mfma_f32_32x32x2bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x2bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x2bf16 mfma_f32_32x32x2bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x2bf16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x2bf16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x2bf16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x2bf16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x2bf16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x2f32 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x2f32GenericAdaptorBase::mfma_f32_32x32x2f32GenericAdaptorBase(mfma_f32_32x32x2f32 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x2f32GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x2f32Adaptor::mfma_f32_32x32x2f32Adaptor(mfma_f32_32x32x2f32 op) : mfma_f32_32x32x2f32GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x2f32Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x2f32::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x2f32::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x2f32::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x2f32::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x2f32::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x2f32::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x2f32::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x2f32::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x2f32::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x2f32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x2f32 mfma_f32_32x32x2f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x2f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x2f32 mfma_f32_32x32x2f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x2f32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x2f32 mfma_f32_32x32x2f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x2f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x2f32 mfma_f32_32x32x2f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x2f32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x2f32 mfma_f32_32x32x2f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x2f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x2f32 mfma_f32_32x32x2f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x2f32::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x2f32::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x2f32::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x2f32::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x2f32)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x4_xf32 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x4_xf32GenericAdaptorBase::mfma_f32_32x32x4_xf32GenericAdaptorBase(mfma_f32_32x32x4_xf32 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x4_xf32GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x4_xf32Adaptor::mfma_f32_32x32x4_xf32Adaptor(mfma_f32_32x32x4_xf32 op) : mfma_f32_32x32x4_xf32GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x4_xf32Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x4_xf32::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x4_xf32::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x4_xf32::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x4_xf32::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x4_xf32::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x4_xf32::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x4_xf32::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x4_xf32::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x4_xf32::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x4_xf32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x4_xf32 mfma_f32_32x32x4_xf32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x4_xf32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x4_xf32 mfma_f32_32x32x4_xf32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x4_xf32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x4_xf32 mfma_f32_32x32x4_xf32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x4_xf32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x4_xf32 mfma_f32_32x32x4_xf32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x4_xf32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x4_xf32 mfma_f32_32x32x4_xf32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x4_xf32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x4_xf32 mfma_f32_32x32x4_xf32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x4_xf32::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x4_xf32::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x4_xf32::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x4_xf32::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x4_xf32)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x4bf16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x4bf16GenericAdaptorBase::mfma_f32_32x32x4bf16GenericAdaptorBase(mfma_f32_32x32x4bf16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x4bf16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x4bf16Adaptor::mfma_f32_32x32x4bf16Adaptor(mfma_f32_32x32x4bf16 op) : mfma_f32_32x32x4bf16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x4bf16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x4bf16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x4bf16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x4bf16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x4bf16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x4bf16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x4bf16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x4bf16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x4bf16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x4bf16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x4bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x4bf16 mfma_f32_32x32x4bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x4bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x4bf16 mfma_f32_32x32x4bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x4bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x4bf16 mfma_f32_32x32x4bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x4bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x4bf16 mfma_f32_32x32x4bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x4bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x4bf16 mfma_f32_32x32x4bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x4bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x4bf16 mfma_f32_32x32x4bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x4bf16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x4bf16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x4bf16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x4bf16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x4bf16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x4bf16_1k definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x4bf16_1kGenericAdaptorBase::mfma_f32_32x32x4bf16_1kGenericAdaptorBase(mfma_f32_32x32x4bf16_1k op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x4bf16_1kGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x4bf16_1kAdaptor::mfma_f32_32x32x4bf16_1kAdaptor(mfma_f32_32x32x4bf16_1k op) : mfma_f32_32x32x4bf16_1kGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x4bf16_1kAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x4bf16_1k::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x4bf16_1k::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x4bf16_1k::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x4bf16_1k::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x4bf16_1k::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x4bf16_1k::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x4bf16_1k::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x4bf16_1k::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x4bf16_1k::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x4bf16_1k::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x4bf16_1k mfma_f32_32x32x4bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x4bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x4bf16_1k mfma_f32_32x32x4bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x4bf16_1k::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x4bf16_1k mfma_f32_32x32x4bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x4bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x4bf16_1k mfma_f32_32x32x4bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x4bf16_1k::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x4bf16_1k mfma_f32_32x32x4bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x4bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x4bf16_1k mfma_f32_32x32x4bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x4bf16_1k::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x4bf16_1k::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x4bf16_1k::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x4bf16_1k::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x4bf16_1k)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x4f16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x4f16GenericAdaptorBase::mfma_f32_32x32x4f16GenericAdaptorBase(mfma_f32_32x32x4f16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x4f16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x4f16Adaptor::mfma_f32_32x32x4f16Adaptor(mfma_f32_32x32x4f16 op) : mfma_f32_32x32x4f16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x4f16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x4f16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x4f16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x4f16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x4f16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x4f16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x4f16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x4f16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x4f16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x4f16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x4f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x4f16 mfma_f32_32x32x4f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x4f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x4f16 mfma_f32_32x32x4f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x4f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x4f16 mfma_f32_32x32x4f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x4f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x4f16 mfma_f32_32x32x4f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x4f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x4f16 mfma_f32_32x32x4f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x4f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x4f16 mfma_f32_32x32x4f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x4f16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x4f16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x4f16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x4f16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x4f16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x8bf16_1k definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x8bf16_1kGenericAdaptorBase::mfma_f32_32x32x8bf16_1kGenericAdaptorBase(mfma_f32_32x32x8bf16_1k op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x8bf16_1kGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x8bf16_1kAdaptor::mfma_f32_32x32x8bf16_1kAdaptor(mfma_f32_32x32x8bf16_1k op) : mfma_f32_32x32x8bf16_1kGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x8bf16_1kAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x8bf16_1k::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x8bf16_1k::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x8bf16_1k::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x8bf16_1k::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x8bf16_1k::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x8bf16_1k::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x8bf16_1k::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x8bf16_1k::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x8bf16_1k::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x8bf16_1k::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x8bf16_1k mfma_f32_32x32x8bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x8bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x8bf16_1k mfma_f32_32x32x8bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x8bf16_1k::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x8bf16_1k mfma_f32_32x32x8bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x8bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x8bf16_1k mfma_f32_32x32x8bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x8bf16_1k::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x8bf16_1k mfma_f32_32x32x8bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x8bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x8bf16_1k mfma_f32_32x32x8bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x8bf16_1k::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x8bf16_1k::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x8bf16_1k::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x8bf16_1k::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x8bf16_1k)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_32x32x8f16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_32x32x8f16GenericAdaptorBase::mfma_f32_32x32x8f16GenericAdaptorBase(mfma_f32_32x32x8f16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_32x32x8f16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_32x32x8f16Adaptor::mfma_f32_32x32x8f16Adaptor(mfma_f32_32x32x8f16 op) : mfma_f32_32x32x8f16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_32x32x8f16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_32x32x8f16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_32x32x8f16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_32x32x8f16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_32x32x8f16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_32x32x8f16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_32x32x8f16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_32x32x8f16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_32x32x8f16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_32x32x8f16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_32x32x8f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_32x32x8f16 mfma_f32_32x32x8f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x8f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x8f16 mfma_f32_32x32x8f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_32x32x8f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x8f16 mfma_f32_32x32x8f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x8f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x8f16 mfma_f32_32x32x8f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_32x32x8f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_32x32x8f16 mfma_f32_32x32x8f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_32x32x8f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_32x32x8f16 mfma_f32_32x32x8f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_32x32x8f16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_32x32x8f16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_32x32x8f16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_32x32x8f16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_32x32x8f16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_4x4x1f32 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_4x4x1f32GenericAdaptorBase::mfma_f32_4x4x1f32GenericAdaptorBase(mfma_f32_4x4x1f32 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_4x4x1f32GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_4x4x1f32Adaptor::mfma_f32_4x4x1f32Adaptor(mfma_f32_4x4x1f32 op) : mfma_f32_4x4x1f32GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_4x4x1f32Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_4x4x1f32::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_4x4x1f32::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_4x4x1f32::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_4x4x1f32::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_4x4x1f32::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_4x4x1f32::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_4x4x1f32::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_4x4x1f32::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_4x4x1f32::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_4x4x1f32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_4x4x1f32 mfma_f32_4x4x1f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_4x4x1f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_4x4x1f32 mfma_f32_4x4x1f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_4x4x1f32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_4x4x1f32 mfma_f32_4x4x1f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_4x4x1f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_4x4x1f32 mfma_f32_4x4x1f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_4x4x1f32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_4x4x1f32 mfma_f32_4x4x1f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_4x4x1f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_4x4x1f32 mfma_f32_4x4x1f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_4x4x1f32::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_4x4x1f32::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_4x4x1f32::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_4x4x1f32::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_4x4x1f32)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_4x4x2bf16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_4x4x2bf16GenericAdaptorBase::mfma_f32_4x4x2bf16GenericAdaptorBase(mfma_f32_4x4x2bf16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_4x4x2bf16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_4x4x2bf16Adaptor::mfma_f32_4x4x2bf16Adaptor(mfma_f32_4x4x2bf16 op) : mfma_f32_4x4x2bf16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_4x4x2bf16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_4x4x2bf16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_4x4x2bf16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_4x4x2bf16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_4x4x2bf16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_4x4x2bf16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_4x4x2bf16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_4x4x2bf16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_4x4x2bf16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_4x4x2bf16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_4x4x2bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_4x4x2bf16 mfma_f32_4x4x2bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_4x4x2bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_4x4x2bf16 mfma_f32_4x4x2bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_4x4x2bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_4x4x2bf16 mfma_f32_4x4x2bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_4x4x2bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_4x4x2bf16 mfma_f32_4x4x2bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_4x4x2bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_4x4x2bf16 mfma_f32_4x4x2bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_4x4x2bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_4x4x2bf16 mfma_f32_4x4x2bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_4x4x2bf16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_4x4x2bf16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_4x4x2bf16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_4x4x2bf16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_4x4x2bf16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_4x4x4bf16_1k definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_4x4x4bf16_1kGenericAdaptorBase::mfma_f32_4x4x4bf16_1kGenericAdaptorBase(mfma_f32_4x4x4bf16_1k op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_4x4x4bf16_1kGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_4x4x4bf16_1kAdaptor::mfma_f32_4x4x4bf16_1kAdaptor(mfma_f32_4x4x4bf16_1k op) : mfma_f32_4x4x4bf16_1kGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_4x4x4bf16_1kAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_4x4x4bf16_1k::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_4x4x4bf16_1k::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_4x4x4bf16_1k::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_4x4x4bf16_1k::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_4x4x4bf16_1k::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_4x4x4bf16_1k::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_4x4x4bf16_1k::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_4x4x4bf16_1k::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_4x4x4bf16_1k::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_4x4x4bf16_1k::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_4x4x4bf16_1k mfma_f32_4x4x4bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_4x4x4bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_4x4x4bf16_1k mfma_f32_4x4x4bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_4x4x4bf16_1k::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_4x4x4bf16_1k mfma_f32_4x4x4bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_4x4x4bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_4x4x4bf16_1k mfma_f32_4x4x4bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_4x4x4bf16_1k::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_4x4x4bf16_1k mfma_f32_4x4x4bf16_1k::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_4x4x4bf16_1k>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_4x4x4bf16_1k mfma_f32_4x4x4bf16_1k::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_4x4x4bf16_1k::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_4x4x4bf16_1k::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_4x4x4bf16_1k::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_4x4x4bf16_1k::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_4x4x4bf16_1k)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f32_4x4x4f16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f32_4x4x4f16GenericAdaptorBase::mfma_f32_4x4x4f16GenericAdaptorBase(mfma_f32_4x4x4f16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f32_4x4x4f16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f32_4x4x4f16Adaptor::mfma_f32_4x4x4f16Adaptor(mfma_f32_4x4x4f16 op) : mfma_f32_4x4x4f16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f32_4x4x4f16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f32_4x4x4f16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f32_4x4x4f16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f32_4x4x4f16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f32_4x4x4f16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f32_4x4x4f16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f32_4x4x4f16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f32_4x4x4f16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f32_4x4x4f16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f32_4x4x4f16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f32_4x4x4f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f32_4x4x4f16 mfma_f32_4x4x4f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_4x4x4f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_4x4x4f16 mfma_f32_4x4x4f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f32_4x4x4f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_4x4x4f16 mfma_f32_4x4x4f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_4x4x4f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_4x4x4f16 mfma_f32_4x4x4f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f32_4x4x4f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f32_4x4x4f16 mfma_f32_4x4x4f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f32_4x4x4f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f32_4x4x4f16 mfma_f32_4x4x4f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f32_4x4x4f16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f32_4x4x4f16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f32_4x4x4f16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f32_4x4x4f16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f32_4x4x4f16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f64_16x16x4f64 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f64_16x16x4f64GenericAdaptorBase::mfma_f64_16x16x4f64GenericAdaptorBase(mfma_f64_16x16x4f64 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f64_16x16x4f64GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f64_16x16x4f64Adaptor::mfma_f64_16x16x4f64Adaptor(mfma_f64_16x16x4f64 op) : mfma_f64_16x16x4f64GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f64_16x16x4f64Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f64_16x16x4f64::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f64_16x16x4f64::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f64_16x16x4f64::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f64_16x16x4f64::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f64_16x16x4f64::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f64_16x16x4f64::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f64_16x16x4f64::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f64_16x16x4f64::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f64_16x16x4f64::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f64_16x16x4f64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f64_16x16x4f64 mfma_f64_16x16x4f64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f64_16x16x4f64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f64_16x16x4f64 mfma_f64_16x16x4f64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f64_16x16x4f64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f64_16x16x4f64 mfma_f64_16x16x4f64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f64_16x16x4f64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f64_16x16x4f64 mfma_f64_16x16x4f64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f64_16x16x4f64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f64_16x16x4f64 mfma_f64_16x16x4f64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f64_16x16x4f64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f64_16x16x4f64 mfma_f64_16x16x4f64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f64_16x16x4f64::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f64_16x16x4f64::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f64_16x16x4f64::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f64_16x16x4f64::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f64_16x16x4f64)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_f64_4x4x4f64 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_f64_4x4x4f64GenericAdaptorBase::mfma_f64_4x4x4f64GenericAdaptorBase(mfma_f64_4x4x4f64 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_f64_4x4x4f64GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_f64_4x4x4f64Adaptor::mfma_f64_4x4x4f64Adaptor(mfma_f64_4x4x4f64 op) : mfma_f64_4x4x4f64GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_f64_4x4x4f64Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_f64_4x4x4f64::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_f64_4x4x4f64::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_f64_4x4x4f64::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_f64_4x4x4f64::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_f64_4x4x4f64::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_f64_4x4x4f64::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_f64_4x4x4f64::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_f64_4x4x4f64::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_f64_4x4x4f64::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_f64_4x4x4f64::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_f64_4x4x4f64 mfma_f64_4x4x4f64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_f64_4x4x4f64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f64_4x4x4f64 mfma_f64_4x4x4f64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_f64_4x4x4f64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f64_4x4x4f64 mfma_f64_4x4x4f64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f64_4x4x4f64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f64_4x4x4f64 mfma_f64_4x4x4f64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_f64_4x4x4f64::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_f64_4x4x4f64 mfma_f64_4x4x4f64::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_f64_4x4x4f64>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_f64_4x4x4f64 mfma_f64_4x4x4f64::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_f64_4x4x4f64::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_f64_4x4x4f64::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_f64_4x4x4f64::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_f64_4x4x4f64::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_f64_4x4x4f64)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_i32_16x16x16i8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_i32_16x16x16i8GenericAdaptorBase::mfma_i32_16x16x16i8GenericAdaptorBase(mfma_i32_16x16x16i8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_i32_16x16x16i8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_i32_16x16x16i8Adaptor::mfma_i32_16x16x16i8Adaptor(mfma_i32_16x16x16i8 op) : mfma_i32_16x16x16i8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_i32_16x16x16i8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_i32_16x16x16i8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_i32_16x16x16i8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_i32_16x16x16i8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_i32_16x16x16i8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_i32_16x16x16i8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_i32_16x16x16i8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_i32_16x16x16i8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_i32_16x16x16i8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_i32_16x16x16i8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_i32_16x16x16i8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_i32_16x16x16i8 mfma_i32_16x16x16i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_16x16x16i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_16x16x16i8 mfma_i32_16x16x16i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_i32_16x16x16i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_16x16x16i8 mfma_i32_16x16x16i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_16x16x16i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_16x16x16i8 mfma_i32_16x16x16i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_i32_16x16x16i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_16x16x16i8 mfma_i32_16x16x16i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_16x16x16i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_16x16x16i8 mfma_i32_16x16x16i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_i32_16x16x16i8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_i32_16x16x16i8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_i32_16x16x16i8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_i32_16x16x16i8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_i32_16x16x16i8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_i32_16x16x32_i8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_i32_16x16x32_i8GenericAdaptorBase::mfma_i32_16x16x32_i8GenericAdaptorBase(mfma_i32_16x16x32_i8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_i32_16x16x32_i8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_i32_16x16x32_i8Adaptor::mfma_i32_16x16x32_i8Adaptor(mfma_i32_16x16x32_i8 op) : mfma_i32_16x16x32_i8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_i32_16x16x32_i8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_i32_16x16x32_i8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_i32_16x16x32_i8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_i32_16x16x32_i8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_i32_16x16x32_i8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_i32_16x16x32_i8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_i32_16x16x32_i8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_i32_16x16x32_i8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_i32_16x16x32_i8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_i32_16x16x32_i8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_i32_16x16x32_i8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_i32_16x16x32_i8 mfma_i32_16x16x32_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_16x16x32_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_16x16x32_i8 mfma_i32_16x16x32_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_i32_16x16x32_i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_16x16x32_i8 mfma_i32_16x16x32_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_16x16x32_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_16x16x32_i8 mfma_i32_16x16x32_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_i32_16x16x32_i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_16x16x32_i8 mfma_i32_16x16x32_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_16x16x32_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_16x16x32_i8 mfma_i32_16x16x32_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_i32_16x16x32_i8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_i32_16x16x32_i8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_i32_16x16x32_i8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_i32_16x16x32_i8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_i32_16x16x32_i8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_i32_16x16x4i8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_i32_16x16x4i8GenericAdaptorBase::mfma_i32_16x16x4i8GenericAdaptorBase(mfma_i32_16x16x4i8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_i32_16x16x4i8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_i32_16x16x4i8Adaptor::mfma_i32_16x16x4i8Adaptor(mfma_i32_16x16x4i8 op) : mfma_i32_16x16x4i8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_i32_16x16x4i8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_i32_16x16x4i8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_i32_16x16x4i8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_i32_16x16x4i8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_i32_16x16x4i8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_i32_16x16x4i8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_i32_16x16x4i8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_i32_16x16x4i8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_i32_16x16x4i8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_i32_16x16x4i8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_i32_16x16x4i8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_i32_16x16x4i8 mfma_i32_16x16x4i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_16x16x4i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_16x16x4i8 mfma_i32_16x16x4i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_i32_16x16x4i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_16x16x4i8 mfma_i32_16x16x4i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_16x16x4i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_16x16x4i8 mfma_i32_16x16x4i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_i32_16x16x4i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_16x16x4i8 mfma_i32_16x16x4i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_16x16x4i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_16x16x4i8 mfma_i32_16x16x4i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_i32_16x16x4i8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_i32_16x16x4i8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_i32_16x16x4i8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_i32_16x16x4i8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_i32_16x16x4i8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_i32_16x16x64_i8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_i32_16x16x64_i8GenericAdaptorBase::mfma_i32_16x16x64_i8GenericAdaptorBase(mfma_i32_16x16x64_i8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_i32_16x16x64_i8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_i32_16x16x64_i8Adaptor::mfma_i32_16x16x64_i8Adaptor(mfma_i32_16x16x64_i8 op) : mfma_i32_16x16x64_i8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_i32_16x16x64_i8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_i32_16x16x64_i8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_i32_16x16x64_i8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_i32_16x16x64_i8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_i32_16x16x64_i8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_i32_16x16x64_i8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_i32_16x16x64_i8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_i32_16x16x64_i8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_i32_16x16x64_i8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_i32_16x16x64_i8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_i32_16x16x64_i8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_i32_16x16x64_i8 mfma_i32_16x16x64_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_16x16x64_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_16x16x64_i8 mfma_i32_16x16x64_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_i32_16x16x64_i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_16x16x64_i8 mfma_i32_16x16x64_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_16x16x64_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_16x16x64_i8 mfma_i32_16x16x64_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_i32_16x16x64_i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_16x16x64_i8 mfma_i32_16x16x64_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_16x16x64_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_16x16x64_i8 mfma_i32_16x16x64_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_i32_16x16x64_i8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_i32_16x16x64_i8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_i32_16x16x64_i8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_i32_16x16x64_i8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_i32_16x16x64_i8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_i32_32x32x16_i8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_i32_32x32x16_i8GenericAdaptorBase::mfma_i32_32x32x16_i8GenericAdaptorBase(mfma_i32_32x32x16_i8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_i32_32x32x16_i8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_i32_32x32x16_i8Adaptor::mfma_i32_32x32x16_i8Adaptor(mfma_i32_32x32x16_i8 op) : mfma_i32_32x32x16_i8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_i32_32x32x16_i8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_i32_32x32x16_i8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_i32_32x32x16_i8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_i32_32x32x16_i8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_i32_32x32x16_i8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_i32_32x32x16_i8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_i32_32x32x16_i8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_i32_32x32x16_i8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_i32_32x32x16_i8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_i32_32x32x16_i8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_i32_32x32x16_i8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_i32_32x32x16_i8 mfma_i32_32x32x16_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_32x32x16_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_32x32x16_i8 mfma_i32_32x32x16_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_i32_32x32x16_i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_32x32x16_i8 mfma_i32_32x32x16_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_32x32x16_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_32x32x16_i8 mfma_i32_32x32x16_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_i32_32x32x16_i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_32x32x16_i8 mfma_i32_32x32x16_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_32x32x16_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_32x32x16_i8 mfma_i32_32x32x16_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_i32_32x32x16_i8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_i32_32x32x16_i8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_i32_32x32x16_i8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_i32_32x32x16_i8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_i32_32x32x16_i8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_i32_32x32x32_i8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_i32_32x32x32_i8GenericAdaptorBase::mfma_i32_32x32x32_i8GenericAdaptorBase(mfma_i32_32x32x32_i8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_i32_32x32x32_i8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_i32_32x32x32_i8Adaptor::mfma_i32_32x32x32_i8Adaptor(mfma_i32_32x32x32_i8 op) : mfma_i32_32x32x32_i8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_i32_32x32x32_i8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_i32_32x32x32_i8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_i32_32x32x32_i8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_i32_32x32x32_i8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_i32_32x32x32_i8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_i32_32x32x32_i8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_i32_32x32x32_i8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_i32_32x32x32_i8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_i32_32x32x32_i8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_i32_32x32x32_i8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_i32_32x32x32_i8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_i32_32x32x32_i8 mfma_i32_32x32x32_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_32x32x32_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_32x32x32_i8 mfma_i32_32x32x32_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_i32_32x32x32_i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_32x32x32_i8 mfma_i32_32x32x32_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_32x32x32_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_32x32x32_i8 mfma_i32_32x32x32_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_i32_32x32x32_i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_32x32x32_i8 mfma_i32_32x32x32_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_32x32x32_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_32x32x32_i8 mfma_i32_32x32x32_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_i32_32x32x32_i8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_i32_32x32x32_i8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_i32_32x32x32_i8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_i32_32x32x32_i8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_i32_32x32x32_i8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_i32_32x32x4i8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_i32_32x32x4i8GenericAdaptorBase::mfma_i32_32x32x4i8GenericAdaptorBase(mfma_i32_32x32x4i8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_i32_32x32x4i8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_i32_32x32x4i8Adaptor::mfma_i32_32x32x4i8Adaptor(mfma_i32_32x32x4i8 op) : mfma_i32_32x32x4i8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_i32_32x32x4i8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_i32_32x32x4i8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_i32_32x32x4i8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_i32_32x32x4i8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_i32_32x32x4i8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_i32_32x32x4i8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_i32_32x32x4i8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_i32_32x32x4i8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_i32_32x32x4i8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_i32_32x32x4i8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_i32_32x32x4i8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_i32_32x32x4i8 mfma_i32_32x32x4i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_32x32x4i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_32x32x4i8 mfma_i32_32x32x4i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_i32_32x32x4i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_32x32x4i8 mfma_i32_32x32x4i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_32x32x4i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_32x32x4i8 mfma_i32_32x32x4i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_i32_32x32x4i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_32x32x4i8 mfma_i32_32x32x4i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_32x32x4i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_32x32x4i8 mfma_i32_32x32x4i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_i32_32x32x4i8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_i32_32x32x4i8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_i32_32x32x4i8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_i32_32x32x4i8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_i32_32x32x4i8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_i32_32x32x8i8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_i32_32x32x8i8GenericAdaptorBase::mfma_i32_32x32x8i8GenericAdaptorBase(mfma_i32_32x32x8i8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_i32_32x32x8i8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_i32_32x32x8i8Adaptor::mfma_i32_32x32x8i8Adaptor(mfma_i32_32x32x8i8 op) : mfma_i32_32x32x8i8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_i32_32x32x8i8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_i32_32x32x8i8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_i32_32x32x8i8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_i32_32x32x8i8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_i32_32x32x8i8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_i32_32x32x8i8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_i32_32x32x8i8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_i32_32x32x8i8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_i32_32x32x8i8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_i32_32x32x8i8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_i32_32x32x8i8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_i32_32x32x8i8 mfma_i32_32x32x8i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_32x32x8i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_32x32x8i8 mfma_i32_32x32x8i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_i32_32x32x8i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_32x32x8i8 mfma_i32_32x32x8i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_32x32x8i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_32x32x8i8 mfma_i32_32x32x8i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_i32_32x32x8i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_32x32x8i8 mfma_i32_32x32x8i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_32x32x8i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_32x32x8i8 mfma_i32_32x32x8i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_i32_32x32x8i8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_i32_32x32x8i8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_i32_32x32x8i8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_i32_32x32x8i8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_i32_32x32x8i8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_i32_4x4x4i8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_i32_4x4x4i8GenericAdaptorBase::mfma_i32_4x4x4i8GenericAdaptorBase(mfma_i32_4x4x4i8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_i32_4x4x4i8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_i32_4x4x4i8Adaptor::mfma_i32_4x4x4i8Adaptor(mfma_i32_4x4x4i8 op) : mfma_i32_4x4x4i8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_i32_4x4x4i8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_i32_4x4x4i8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_i32_4x4x4i8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_i32_4x4x4i8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_i32_4x4x4i8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_i32_4x4x4i8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_i32_4x4x4i8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_i32_4x4x4i8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_i32_4x4x4i8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_i32_4x4x4i8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_i32_4x4x4i8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_i32_4x4x4i8 mfma_i32_4x4x4i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_4x4x4i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_4x4x4i8 mfma_i32_4x4x4i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_i32_4x4x4i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_4x4x4i8 mfma_i32_4x4x4i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_4x4x4i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_4x4x4i8 mfma_i32_4x4x4i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_i32_4x4x4i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_i32_4x4x4i8 mfma_i32_4x4x4i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_i32_4x4x4i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_i32_4x4x4i8 mfma_i32_4x4x4i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_i32_4x4x4i8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_i32_4x4x4i8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_i32_4x4x4i8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_i32_4x4x4i8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_i32_4x4x4i8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_scale_f32_16x16x128_f8f6f4 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::mfma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase(mfma_scale_f32_16x16x128_f8f6f4 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_scale_f32_16x16x128_f8f6f4Adaptor::mfma_scale_f32_16x16x128_f8f6f4Adaptor(mfma_scale_f32_16x16x128_f8f6f4 op) : mfma_scale_f32_16x16x128_f8f6f4GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_scale_f32_16x16x128_f8f6f4Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_scale_f32_16x16x128_f8f6f4::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_scale_f32_16x16x128_f8f6f4::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_scale_f32_16x16x128_f8f6f4::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_scale_f32_16x16x128_f8f6f4::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_scale_f32_16x16x128_f8f6f4::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_scale_f32_16x16x128_f8f6f4::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_scale_f32_16x16x128_f8f6f4::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_scale_f32_16x16x128_f8f6f4::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_scale_f32_16x16x128_f8f6f4::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_scale_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_scale_f32_16x16x128_f8f6f4 mfma_scale_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_scale_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_scale_f32_16x16x128_f8f6f4 mfma_scale_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_scale_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_scale_f32_16x16x128_f8f6f4 mfma_scale_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_scale_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_scale_f32_16x16x128_f8f6f4 mfma_scale_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_scale_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_scale_f32_16x16x128_f8f6f4 mfma_scale_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_scale_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_scale_f32_16x16x128_f8f6f4 mfma_scale_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_scale_f32_16x16x128_f8f6f4::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_scale_f32_16x16x128_f8f6f4::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_scale_f32_16x16x128_f8f6f4::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_scale_f32_16x16x128_f8f6f4::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_scale_f32_16x16x128_f8f6f4)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::mfma_scale_f32_32x32x64_f8f6f4 definitions
//===----------------------------------------------------------------------===//

namespace detail {

mfma_scale_f32_32x32x64_f8f6f4GenericAdaptorBase::mfma_scale_f32_32x32x64_f8f6f4GenericAdaptorBase(mfma_scale_f32_32x32x64_f8f6f4 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> mfma_scale_f32_32x32x64_f8f6f4GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
mfma_scale_f32_32x32x64_f8f6f4Adaptor::mfma_scale_f32_32x32x64_f8f6f4Adaptor(mfma_scale_f32_32x32x64_f8f6f4 op) : mfma_scale_f32_32x32x64_f8f6f4GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult mfma_scale_f32_32x32x64_f8f6f4Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> mfma_scale_f32_32x32x64_f8f6f4::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange mfma_scale_f32_32x32x64_f8f6f4::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult mfma_scale_f32_32x32x64_f8f6f4::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute mfma_scale_f32_32x32x64_f8f6f4::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code mfma_scale_f32_32x32x64_f8f6f4::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> mfma_scale_f32_32x32x64_f8f6f4::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void mfma_scale_f32_32x32x64_f8f6f4::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void mfma_scale_f32_32x32x64_f8f6f4::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult mfma_scale_f32_32x32x64_f8f6f4::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void mfma_scale_f32_32x32x64_f8f6f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

mfma_scale_f32_32x32x64_f8f6f4 mfma_scale_f32_32x32x64_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<mfma_scale_f32_32x32x64_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_scale_f32_32x32x64_f8f6f4 mfma_scale_f32_32x32x64_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void mfma_scale_f32_32x32x64_f8f6f4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_scale_f32_32x32x64_f8f6f4 mfma_scale_f32_32x32x64_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<mfma_scale_f32_32x32x64_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_scale_f32_32x32x64_f8f6f4 mfma_scale_f32_32x32x64_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void mfma_scale_f32_32x32x64_f8f6f4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

mfma_scale_f32_32x32x64_f8f6f4 mfma_scale_f32_32x32x64_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<mfma_scale_f32_32x32x64_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

mfma_scale_f32_32x32x64_f8f6f4 mfma_scale_f32_32x32x64_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult mfma_scale_f32_32x32x64_f8f6f4::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult mfma_scale_f32_32x32x64_f8f6f4::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult mfma_scale_f32_32x32x64_f8f6f4::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void mfma_scale_f32_32x32x64_f8f6f4::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::mfma_scale_f32_32x32x64_f8f6f4)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::smfmac_f32_16x16x32_bf16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

smfmac_f32_16x16x32_bf16GenericAdaptorBase::smfmac_f32_16x16x32_bf16GenericAdaptorBase(smfmac_f32_16x16x32_bf16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> smfmac_f32_16x16x32_bf16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
smfmac_f32_16x16x32_bf16Adaptor::smfmac_f32_16x16x32_bf16Adaptor(smfmac_f32_16x16x32_bf16 op) : smfmac_f32_16x16x32_bf16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult smfmac_f32_16x16x32_bf16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> smfmac_f32_16x16x32_bf16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange smfmac_f32_16x16x32_bf16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult smfmac_f32_16x16x32_bf16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute smfmac_f32_16x16x32_bf16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code smfmac_f32_16x16x32_bf16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> smfmac_f32_16x16x32_bf16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void smfmac_f32_16x16x32_bf16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void smfmac_f32_16x16x32_bf16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult smfmac_f32_16x16x32_bf16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void smfmac_f32_16x16x32_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

smfmac_f32_16x16x32_bf16 smfmac_f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x32_bf16 smfmac_f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void smfmac_f32_16x16x32_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_16x16x32_bf16 smfmac_f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x32_bf16 smfmac_f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void smfmac_f32_16x16x32_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_16x16x32_bf16 smfmac_f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x32_bf16 smfmac_f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult smfmac_f32_16x16x32_bf16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult smfmac_f32_16x16x32_bf16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult smfmac_f32_16x16x32_bf16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void smfmac_f32_16x16x32_bf16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::smfmac_f32_16x16x32_bf16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::smfmac_f32_16x16x32_f16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

smfmac_f32_16x16x32_f16GenericAdaptorBase::smfmac_f32_16x16x32_f16GenericAdaptorBase(smfmac_f32_16x16x32_f16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> smfmac_f32_16x16x32_f16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
smfmac_f32_16x16x32_f16Adaptor::smfmac_f32_16x16x32_f16Adaptor(smfmac_f32_16x16x32_f16 op) : smfmac_f32_16x16x32_f16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult smfmac_f32_16x16x32_f16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> smfmac_f32_16x16x32_f16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange smfmac_f32_16x16x32_f16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult smfmac_f32_16x16x32_f16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute smfmac_f32_16x16x32_f16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code smfmac_f32_16x16x32_f16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> smfmac_f32_16x16x32_f16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void smfmac_f32_16x16x32_f16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void smfmac_f32_16x16x32_f16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult smfmac_f32_16x16x32_f16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void smfmac_f32_16x16x32_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

smfmac_f32_16x16x32_f16 smfmac_f32_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x32_f16 smfmac_f32_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void smfmac_f32_16x16x32_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_16x16x32_f16 smfmac_f32_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x32_f16 smfmac_f32_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void smfmac_f32_16x16x32_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_16x16x32_f16 smfmac_f32_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x32_f16 smfmac_f32_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult smfmac_f32_16x16x32_f16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult smfmac_f32_16x16x32_f16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult smfmac_f32_16x16x32_f16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void smfmac_f32_16x16x32_f16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::smfmac_f32_16x16x32_f16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::smfmac_f32_16x16x64_bf8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

smfmac_f32_16x16x64_bf8_bf8GenericAdaptorBase::smfmac_f32_16x16x64_bf8_bf8GenericAdaptorBase(smfmac_f32_16x16x64_bf8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> smfmac_f32_16x16x64_bf8_bf8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
smfmac_f32_16x16x64_bf8_bf8Adaptor::smfmac_f32_16x16x64_bf8_bf8Adaptor(smfmac_f32_16x16x64_bf8_bf8 op) : smfmac_f32_16x16x64_bf8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult smfmac_f32_16x16x64_bf8_bf8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> smfmac_f32_16x16x64_bf8_bf8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange smfmac_f32_16x16x64_bf8_bf8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult smfmac_f32_16x16x64_bf8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute smfmac_f32_16x16x64_bf8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code smfmac_f32_16x16x64_bf8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> smfmac_f32_16x16x64_bf8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void smfmac_f32_16x16x64_bf8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void smfmac_f32_16x16x64_bf8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult smfmac_f32_16x16x64_bf8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void smfmac_f32_16x16x64_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

smfmac_f32_16x16x64_bf8_bf8 smfmac_f32_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x64_bf8_bf8 smfmac_f32_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void smfmac_f32_16x16x64_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_16x16x64_bf8_bf8 smfmac_f32_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x64_bf8_bf8 smfmac_f32_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void smfmac_f32_16x16x64_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_16x16x64_bf8_bf8 smfmac_f32_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x64_bf8_bf8 smfmac_f32_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult smfmac_f32_16x16x64_bf8_bf8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult smfmac_f32_16x16x64_bf8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult smfmac_f32_16x16x64_bf8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void smfmac_f32_16x16x64_bf8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::smfmac_f32_16x16x64_bf8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::smfmac_f32_16x16x64_bf8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

smfmac_f32_16x16x64_bf8_fp8GenericAdaptorBase::smfmac_f32_16x16x64_bf8_fp8GenericAdaptorBase(smfmac_f32_16x16x64_bf8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> smfmac_f32_16x16x64_bf8_fp8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
smfmac_f32_16x16x64_bf8_fp8Adaptor::smfmac_f32_16x16x64_bf8_fp8Adaptor(smfmac_f32_16x16x64_bf8_fp8 op) : smfmac_f32_16x16x64_bf8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult smfmac_f32_16x16x64_bf8_fp8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> smfmac_f32_16x16x64_bf8_fp8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange smfmac_f32_16x16x64_bf8_fp8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult smfmac_f32_16x16x64_bf8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute smfmac_f32_16x16x64_bf8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code smfmac_f32_16x16x64_bf8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> smfmac_f32_16x16x64_bf8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void smfmac_f32_16x16x64_bf8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void smfmac_f32_16x16x64_bf8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult smfmac_f32_16x16x64_bf8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void smfmac_f32_16x16x64_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

smfmac_f32_16x16x64_bf8_fp8 smfmac_f32_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x64_bf8_fp8 smfmac_f32_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void smfmac_f32_16x16x64_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_16x16x64_bf8_fp8 smfmac_f32_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x64_bf8_fp8 smfmac_f32_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void smfmac_f32_16x16x64_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_16x16x64_bf8_fp8 smfmac_f32_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x64_bf8_fp8 smfmac_f32_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult smfmac_f32_16x16x64_bf8_fp8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult smfmac_f32_16x16x64_bf8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult smfmac_f32_16x16x64_bf8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void smfmac_f32_16x16x64_bf8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::smfmac_f32_16x16x64_bf8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::smfmac_f32_16x16x64_fp8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

smfmac_f32_16x16x64_fp8_bf8GenericAdaptorBase::smfmac_f32_16x16x64_fp8_bf8GenericAdaptorBase(smfmac_f32_16x16x64_fp8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> smfmac_f32_16x16x64_fp8_bf8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
smfmac_f32_16x16x64_fp8_bf8Adaptor::smfmac_f32_16x16x64_fp8_bf8Adaptor(smfmac_f32_16x16x64_fp8_bf8 op) : smfmac_f32_16x16x64_fp8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult smfmac_f32_16x16x64_fp8_bf8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> smfmac_f32_16x16x64_fp8_bf8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange smfmac_f32_16x16x64_fp8_bf8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult smfmac_f32_16x16x64_fp8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute smfmac_f32_16x16x64_fp8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code smfmac_f32_16x16x64_fp8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> smfmac_f32_16x16x64_fp8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void smfmac_f32_16x16x64_fp8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void smfmac_f32_16x16x64_fp8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult smfmac_f32_16x16x64_fp8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void smfmac_f32_16x16x64_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

smfmac_f32_16x16x64_fp8_bf8 smfmac_f32_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x64_fp8_bf8 smfmac_f32_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void smfmac_f32_16x16x64_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_16x16x64_fp8_bf8 smfmac_f32_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x64_fp8_bf8 smfmac_f32_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void smfmac_f32_16x16x64_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_16x16x64_fp8_bf8 smfmac_f32_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x64_fp8_bf8 smfmac_f32_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult smfmac_f32_16x16x64_fp8_bf8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult smfmac_f32_16x16x64_fp8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult smfmac_f32_16x16x64_fp8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void smfmac_f32_16x16x64_fp8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::smfmac_f32_16x16x64_fp8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::smfmac_f32_16x16x64_fp8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

smfmac_f32_16x16x64_fp8_fp8GenericAdaptorBase::smfmac_f32_16x16x64_fp8_fp8GenericAdaptorBase(smfmac_f32_16x16x64_fp8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> smfmac_f32_16x16x64_fp8_fp8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
smfmac_f32_16x16x64_fp8_fp8Adaptor::smfmac_f32_16x16x64_fp8_fp8Adaptor(smfmac_f32_16x16x64_fp8_fp8 op) : smfmac_f32_16x16x64_fp8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult smfmac_f32_16x16x64_fp8_fp8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> smfmac_f32_16x16x64_fp8_fp8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange smfmac_f32_16x16x64_fp8_fp8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult smfmac_f32_16x16x64_fp8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute smfmac_f32_16x16x64_fp8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code smfmac_f32_16x16x64_fp8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> smfmac_f32_16x16x64_fp8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void smfmac_f32_16x16x64_fp8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void smfmac_f32_16x16x64_fp8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult smfmac_f32_16x16x64_fp8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void smfmac_f32_16x16x64_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

smfmac_f32_16x16x64_fp8_fp8 smfmac_f32_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x64_fp8_fp8 smfmac_f32_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void smfmac_f32_16x16x64_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_16x16x64_fp8_fp8 smfmac_f32_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x64_fp8_fp8 smfmac_f32_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void smfmac_f32_16x16x64_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_16x16x64_fp8_fp8 smfmac_f32_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_16x16x64_fp8_fp8 smfmac_f32_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult smfmac_f32_16x16x64_fp8_fp8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult smfmac_f32_16x16x64_fp8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult smfmac_f32_16x16x64_fp8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void smfmac_f32_16x16x64_fp8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::smfmac_f32_16x16x64_fp8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::smfmac_f32_32x32x16_bf16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

smfmac_f32_32x32x16_bf16GenericAdaptorBase::smfmac_f32_32x32x16_bf16GenericAdaptorBase(smfmac_f32_32x32x16_bf16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> smfmac_f32_32x32x16_bf16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
smfmac_f32_32x32x16_bf16Adaptor::smfmac_f32_32x32x16_bf16Adaptor(smfmac_f32_32x32x16_bf16 op) : smfmac_f32_32x32x16_bf16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult smfmac_f32_32x32x16_bf16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> smfmac_f32_32x32x16_bf16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange smfmac_f32_32x32x16_bf16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult smfmac_f32_32x32x16_bf16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute smfmac_f32_32x32x16_bf16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code smfmac_f32_32x32x16_bf16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> smfmac_f32_32x32x16_bf16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void smfmac_f32_32x32x16_bf16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void smfmac_f32_32x32x16_bf16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult smfmac_f32_32x32x16_bf16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void smfmac_f32_32x32x16_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

smfmac_f32_32x32x16_bf16 smfmac_f32_32x32x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x16_bf16 smfmac_f32_32x32x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void smfmac_f32_32x32x16_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_32x32x16_bf16 smfmac_f32_32x32x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x16_bf16 smfmac_f32_32x32x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void smfmac_f32_32x32x16_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_32x32x16_bf16 smfmac_f32_32x32x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x16_bf16 smfmac_f32_32x32x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult smfmac_f32_32x32x16_bf16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult smfmac_f32_32x32x16_bf16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult smfmac_f32_32x32x16_bf16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void smfmac_f32_32x32x16_bf16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::smfmac_f32_32x32x16_bf16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::smfmac_f32_32x32x16_f16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

smfmac_f32_32x32x16_f16GenericAdaptorBase::smfmac_f32_32x32x16_f16GenericAdaptorBase(smfmac_f32_32x32x16_f16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> smfmac_f32_32x32x16_f16GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
smfmac_f32_32x32x16_f16Adaptor::smfmac_f32_32x32x16_f16Adaptor(smfmac_f32_32x32x16_f16 op) : smfmac_f32_32x32x16_f16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult smfmac_f32_32x32x16_f16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> smfmac_f32_32x32x16_f16::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange smfmac_f32_32x32x16_f16::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult smfmac_f32_32x32x16_f16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute smfmac_f32_32x32x16_f16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code smfmac_f32_32x32x16_f16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> smfmac_f32_32x32x16_f16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void smfmac_f32_32x32x16_f16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void smfmac_f32_32x32x16_f16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult smfmac_f32_32x32x16_f16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void smfmac_f32_32x32x16_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

smfmac_f32_32x32x16_f16 smfmac_f32_32x32x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x16_f16 smfmac_f32_32x32x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void smfmac_f32_32x32x16_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_32x32x16_f16 smfmac_f32_32x32x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x16_f16 smfmac_f32_32x32x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void smfmac_f32_32x32x16_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_32x32x16_f16 smfmac_f32_32x32x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x16_f16 smfmac_f32_32x32x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult smfmac_f32_32x32x16_f16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult smfmac_f32_32x32x16_f16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult smfmac_f32_32x32x16_f16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void smfmac_f32_32x32x16_f16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::smfmac_f32_32x32x16_f16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::smfmac_f32_32x32x32_bf8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

smfmac_f32_32x32x32_bf8_bf8GenericAdaptorBase::smfmac_f32_32x32x32_bf8_bf8GenericAdaptorBase(smfmac_f32_32x32x32_bf8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> smfmac_f32_32x32x32_bf8_bf8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
smfmac_f32_32x32x32_bf8_bf8Adaptor::smfmac_f32_32x32x32_bf8_bf8Adaptor(smfmac_f32_32x32x32_bf8_bf8 op) : smfmac_f32_32x32x32_bf8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult smfmac_f32_32x32x32_bf8_bf8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> smfmac_f32_32x32x32_bf8_bf8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange smfmac_f32_32x32x32_bf8_bf8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult smfmac_f32_32x32x32_bf8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute smfmac_f32_32x32x32_bf8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code smfmac_f32_32x32x32_bf8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> smfmac_f32_32x32x32_bf8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void smfmac_f32_32x32x32_bf8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void smfmac_f32_32x32x32_bf8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult smfmac_f32_32x32x32_bf8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void smfmac_f32_32x32x32_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

smfmac_f32_32x32x32_bf8_bf8 smfmac_f32_32x32x32_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x32_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x32_bf8_bf8 smfmac_f32_32x32x32_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void smfmac_f32_32x32x32_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_32x32x32_bf8_bf8 smfmac_f32_32x32x32_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x32_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x32_bf8_bf8 smfmac_f32_32x32x32_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void smfmac_f32_32x32x32_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_32x32x32_bf8_bf8 smfmac_f32_32x32x32_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x32_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x32_bf8_bf8 smfmac_f32_32x32x32_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult smfmac_f32_32x32x32_bf8_bf8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult smfmac_f32_32x32x32_bf8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult smfmac_f32_32x32x32_bf8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void smfmac_f32_32x32x32_bf8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::smfmac_f32_32x32x32_bf8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::smfmac_f32_32x32x32_bf8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

smfmac_f32_32x32x32_bf8_fp8GenericAdaptorBase::smfmac_f32_32x32x32_bf8_fp8GenericAdaptorBase(smfmac_f32_32x32x32_bf8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> smfmac_f32_32x32x32_bf8_fp8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
smfmac_f32_32x32x32_bf8_fp8Adaptor::smfmac_f32_32x32x32_bf8_fp8Adaptor(smfmac_f32_32x32x32_bf8_fp8 op) : smfmac_f32_32x32x32_bf8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult smfmac_f32_32x32x32_bf8_fp8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> smfmac_f32_32x32x32_bf8_fp8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange smfmac_f32_32x32x32_bf8_fp8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult smfmac_f32_32x32x32_bf8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute smfmac_f32_32x32x32_bf8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code smfmac_f32_32x32x32_bf8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> smfmac_f32_32x32x32_bf8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void smfmac_f32_32x32x32_bf8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void smfmac_f32_32x32x32_bf8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult smfmac_f32_32x32x32_bf8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void smfmac_f32_32x32x32_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

smfmac_f32_32x32x32_bf8_fp8 smfmac_f32_32x32x32_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x32_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x32_bf8_fp8 smfmac_f32_32x32x32_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void smfmac_f32_32x32x32_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_32x32x32_bf8_fp8 smfmac_f32_32x32x32_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x32_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x32_bf8_fp8 smfmac_f32_32x32x32_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void smfmac_f32_32x32x32_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_32x32x32_bf8_fp8 smfmac_f32_32x32x32_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x32_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x32_bf8_fp8 smfmac_f32_32x32x32_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult smfmac_f32_32x32x32_bf8_fp8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult smfmac_f32_32x32x32_bf8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult smfmac_f32_32x32x32_bf8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void smfmac_f32_32x32x32_bf8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::smfmac_f32_32x32x32_bf8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::smfmac_f32_32x32x32_fp8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

smfmac_f32_32x32x32_fp8_bf8GenericAdaptorBase::smfmac_f32_32x32x32_fp8_bf8GenericAdaptorBase(smfmac_f32_32x32x32_fp8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> smfmac_f32_32x32x32_fp8_bf8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
smfmac_f32_32x32x32_fp8_bf8Adaptor::smfmac_f32_32x32x32_fp8_bf8Adaptor(smfmac_f32_32x32x32_fp8_bf8 op) : smfmac_f32_32x32x32_fp8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult smfmac_f32_32x32x32_fp8_bf8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> smfmac_f32_32x32x32_fp8_bf8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange smfmac_f32_32x32x32_fp8_bf8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult smfmac_f32_32x32x32_fp8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute smfmac_f32_32x32x32_fp8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code smfmac_f32_32x32x32_fp8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> smfmac_f32_32x32x32_fp8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void smfmac_f32_32x32x32_fp8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void smfmac_f32_32x32x32_fp8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult smfmac_f32_32x32x32_fp8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void smfmac_f32_32x32x32_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

smfmac_f32_32x32x32_fp8_bf8 smfmac_f32_32x32x32_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x32_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x32_fp8_bf8 smfmac_f32_32x32x32_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void smfmac_f32_32x32x32_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_32x32x32_fp8_bf8 smfmac_f32_32x32x32_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x32_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x32_fp8_bf8 smfmac_f32_32x32x32_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void smfmac_f32_32x32x32_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_32x32x32_fp8_bf8 smfmac_f32_32x32x32_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x32_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x32_fp8_bf8 smfmac_f32_32x32x32_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult smfmac_f32_32x32x32_fp8_bf8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult smfmac_f32_32x32x32_fp8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult smfmac_f32_32x32x32_fp8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void smfmac_f32_32x32x32_fp8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::smfmac_f32_32x32x32_fp8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::smfmac_f32_32x32x32_fp8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

smfmac_f32_32x32x32_fp8_fp8GenericAdaptorBase::smfmac_f32_32x32x32_fp8_fp8GenericAdaptorBase(smfmac_f32_32x32x32_fp8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> smfmac_f32_32x32x32_fp8_fp8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
smfmac_f32_32x32x32_fp8_fp8Adaptor::smfmac_f32_32x32x32_fp8_fp8Adaptor(smfmac_f32_32x32x32_fp8_fp8 op) : smfmac_f32_32x32x32_fp8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult smfmac_f32_32x32x32_fp8_fp8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> smfmac_f32_32x32x32_fp8_fp8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange smfmac_f32_32x32x32_fp8_fp8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult smfmac_f32_32x32x32_fp8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute smfmac_f32_32x32x32_fp8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code smfmac_f32_32x32x32_fp8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> smfmac_f32_32x32x32_fp8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void smfmac_f32_32x32x32_fp8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void smfmac_f32_32x32x32_fp8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult smfmac_f32_32x32x32_fp8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void smfmac_f32_32x32x32_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

smfmac_f32_32x32x32_fp8_fp8 smfmac_f32_32x32x32_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x32_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x32_fp8_fp8 smfmac_f32_32x32x32_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void smfmac_f32_32x32x32_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_32x32x32_fp8_fp8 smfmac_f32_32x32x32_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x32_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x32_fp8_fp8 smfmac_f32_32x32x32_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void smfmac_f32_32x32x32_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_f32_32x32x32_fp8_fp8 smfmac_f32_32x32x32_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_f32_32x32x32_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_f32_32x32x32_fp8_fp8 smfmac_f32_32x32x32_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult smfmac_f32_32x32x32_fp8_fp8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult smfmac_f32_32x32x32_fp8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult smfmac_f32_32x32x32_fp8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void smfmac_f32_32x32x32_fp8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::smfmac_f32_32x32x32_fp8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::smfmac_i32_16x16x64_i8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

smfmac_i32_16x16x64_i8GenericAdaptorBase::smfmac_i32_16x16x64_i8GenericAdaptorBase(smfmac_i32_16x16x64_i8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> smfmac_i32_16x16x64_i8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
smfmac_i32_16x16x64_i8Adaptor::smfmac_i32_16x16x64_i8Adaptor(smfmac_i32_16x16x64_i8 op) : smfmac_i32_16x16x64_i8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult smfmac_i32_16x16x64_i8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> smfmac_i32_16x16x64_i8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange smfmac_i32_16x16x64_i8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult smfmac_i32_16x16x64_i8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute smfmac_i32_16x16x64_i8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code smfmac_i32_16x16x64_i8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> smfmac_i32_16x16x64_i8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void smfmac_i32_16x16x64_i8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void smfmac_i32_16x16x64_i8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult smfmac_i32_16x16x64_i8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void smfmac_i32_16x16x64_i8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

smfmac_i32_16x16x64_i8 smfmac_i32_16x16x64_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<smfmac_i32_16x16x64_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_i32_16x16x64_i8 smfmac_i32_16x16x64_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void smfmac_i32_16x16x64_i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_i32_16x16x64_i8 smfmac_i32_16x16x64_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_i32_16x16x64_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_i32_16x16x64_i8 smfmac_i32_16x16x64_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void smfmac_i32_16x16x64_i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_i32_16x16x64_i8 smfmac_i32_16x16x64_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_i32_16x16x64_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_i32_16x16x64_i8 smfmac_i32_16x16x64_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult smfmac_i32_16x16x64_i8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult smfmac_i32_16x16x64_i8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult smfmac_i32_16x16x64_i8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void smfmac_i32_16x16x64_i8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::smfmac_i32_16x16x64_i8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::smfmac_i32_32x32x32_i8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

smfmac_i32_32x32x32_i8GenericAdaptorBase::smfmac_i32_32x32x32_i8GenericAdaptorBase(smfmac_i32_32x32x32_i8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

std::pair<unsigned, unsigned> smfmac_i32_32x32x32_i8GenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (odsOperandsSize - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}


} // namespace detail
smfmac_i32_32x32x32_i8Adaptor::smfmac_i32_32x32x32_i8Adaptor(smfmac_i32_32x32x32_i8 op) : smfmac_i32_32x32x32_i8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult smfmac_i32_32x32x32_i8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

std::pair<unsigned, unsigned> smfmac_i32_32x32x32_i8::getODSOperandIndexAndLength(unsigned index) {
  bool isVariadic[] = {true};
  int prevVariadicCount = 0;
  for (unsigned i = 0; i < index; ++i)
    if (isVariadic[i]) ++prevVariadicCount;

  // Calculate how many dynamic values a static variadic operand corresponds to.
  // This assumes all static variadic operands have the same dynamic value count.
  int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
  // `index` passed in as the parameter is the static index which counts each
  // operand (variadic or not) as size 1. So here for each previous static variadic
  // operand, we need to offset by (variadicSize - 1) to get where the dynamic
  // value pack for this static operand starts.
  int start = index + (variadicSize - 1) * prevVariadicCount;
  int size = isVariadic[index] ? variadicSize : 1;
  return {start, size};
}

::mlir::MutableOperandRange smfmac_i32_32x32x32_i8::getArgsMutable() {
  auto range = getODSOperandIndexAndLength(0);
  auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
  return mutableRange;
}

::llvm::LogicalResult smfmac_i32_32x32x32_i8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute smfmac_i32_32x32x32_i8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code smfmac_i32_32x32x32_i8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> smfmac_i32_32x32x32_i8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void smfmac_i32_32x32x32_i8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void smfmac_i32_32x32x32_i8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult smfmac_i32_32x32x32_i8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void smfmac_i32_32x32x32_i8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::ValueRange args) {
  odsState.addOperands(args);
  odsState.addTypes(res);
}

smfmac_i32_32x32x32_i8 smfmac_i32_32x32x32_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::ValueRange args) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, args);
  auto __res__ = ::llvm::dyn_cast<smfmac_i32_32x32x32_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_i32_32x32x32_i8 smfmac_i32_32x32x32_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::ValueRange args) {
  return create(builder, builder.getLoc(), res, args);
}

void smfmac_i32_32x32x32_i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_i32_32x32x32_i8 smfmac_i32_32x32x32_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_i32_32x32x32_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_i32_32x32x32_i8 smfmac_i32_32x32x32_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void smfmac_i32_32x32x32_i8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

smfmac_i32_32x32x32_i8 smfmac_i32_32x32x32_i8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<smfmac_i32_32x32x32_i8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

smfmac_i32_32x32x32_i8 smfmac_i32_32x32x32_i8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult smfmac_i32_32x32x32_i8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps33(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps2(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult smfmac_i32_32x32x32_i8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult smfmac_i32_32x32x32_i8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argsOperands;
  ::llvm::SMLoc argsOperandsLoc;
  (void)argsOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> argsTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  argsOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperandList(argsOperands))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType args__res_functionType;
  if (parser.parseType(args__res_functionType))
    return ::mlir::failure();
  argsTypes = args__res_functionType.getInputs();
  resTypes = args__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(argsOperands, argsTypes, argsOperandsLoc, result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void smfmac_i32_32x32x32_i8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getArgs();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getArgs().getTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::smfmac_i32_32x32x32_i8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_bf16_16x16x16_bf16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_bf16_16x16x16_bf16GenericAdaptorBase::wmma_bf16_16x16x16_bf16GenericAdaptorBase(wmma_bf16_16x16x16_bf16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_bf16_16x16x16_bf16GenericAdaptorBase::getOpselAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().opsel);
  return attr;
}

bool wmma_bf16_16x16x16_bf16GenericAdaptorBase::getOpsel() {
  auto attr = getOpselAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_bf16_16x16x16_bf16Adaptor::wmma_bf16_16x16x16_bf16Adaptor(wmma_bf16_16x16x16_bf16 op) : wmma_bf16_16x16x16_bf16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_bf16_16x16x16_bf16Adaptor::verify(::mlir::Location loc) {
  auto tblgen_opsel = getProperties().opsel; (void)tblgen_opsel;

  if (tblgen_opsel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_opsel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_opsel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.bf16.16x16x16.bf16' op attribute 'opsel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_bf16_16x16x16_bf16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.opsel;
       auto attr = dict.get("opsel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `opsel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_bf16_16x16x16_bf16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.opsel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("opsel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_bf16_16x16x16_bf16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.opsel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_bf16_16x16x16_bf16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "opsel")
      return prop.opsel;
  return std::nullopt;
}

void wmma_bf16_16x16x16_bf16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "opsel") {
       prop.opsel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.opsel)>>(value);
       return;
    }
}

void wmma_bf16_16x16x16_bf16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.opsel) attrs.append("opsel", prop.opsel);
}

::llvm::LogicalResult wmma_bf16_16x16x16_bf16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getOpselAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "opsel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_bf16_16x16x16_bf16::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.opsel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_bf16_16x16x16_bf16::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.opsel);
}

bool wmma_bf16_16x16x16_bf16::getOpsel() {
  auto attr = getOpselAttr();
  return attr.getValue().getZExtValue();
}

void wmma_bf16_16x16x16_bf16::setOpsel(bool attrValue) {
  getProperties().opsel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_bf16_16x16x16_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr opsel) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (opsel) {
    odsState.getOrAddProperties<Properties>().opsel = opsel;
  }
  odsState.addTypes(res);
}

wmma_bf16_16x16x16_bf16 wmma_bf16_16x16x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr opsel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, c, opsel);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16_16x16x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16_16x16x16_bf16 wmma_bf16_16x16x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr opsel) {
  return create(builder, builder.getLoc(), res, a, b, c, opsel);
}

void wmma_bf16_16x16x16_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr opsel) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (opsel) {
    odsState.getOrAddProperties<Properties>().opsel = opsel;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_bf16_16x16x16_bf16 wmma_bf16_16x16x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr opsel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, c, opsel);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16_16x16x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16_16x16x16_bf16 wmma_bf16_16x16x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr opsel) {
  return create(builder, builder.getLoc(), resultTypes, a, b, c, opsel);
}

void wmma_bf16_16x16x16_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, bool opsel) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().opsel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), opsel);
  odsState.addTypes(res);
}

wmma_bf16_16x16x16_bf16 wmma_bf16_16x16x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, bool opsel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, c, opsel);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16_16x16x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16_16x16x16_bf16 wmma_bf16_16x16x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, bool opsel) {
  return create(builder, builder.getLoc(), res, a, b, c, opsel);
}

void wmma_bf16_16x16x16_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, bool opsel) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().opsel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), opsel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_bf16_16x16x16_bf16 wmma_bf16_16x16x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, bool opsel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, c, opsel);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16_16x16x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16_16x16x16_bf16 wmma_bf16_16x16x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, bool opsel) {
  return create(builder, builder.getLoc(), resultTypes, a, b, c, opsel);
}

void wmma_bf16_16x16x16_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_bf16_16x16x16_bf16::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_bf16_16x16x16_bf16 wmma_bf16_16x16x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16_16x16x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16_16x16x16_bf16 wmma_bf16_16x16x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_bf16_16x16x16_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_bf16_16x16x16_bf16 wmma_bf16_16x16x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16_16x16x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16_16x16x16_bf16 wmma_bf16_16x16x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_bf16_16x16x16_bf16::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.opsel)
    properties.opsel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_bf16_16x16x16_bf16::verifyInvariantsImpl() {
  auto tblgen_opsel = getProperties().opsel; (void)tblgen_opsel;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_opsel, "opsel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_bf16_16x16x16_bf16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_bf16_16x16x16_bf16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_bf16_16x16x16_bf16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getOpselAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("opsel");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_bf16_16x16x16_bf16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_bf16_16x16x32_bf16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_bf16_16x16x32_bf16GenericAdaptorBase::wmma_bf16_16x16x32_bf16GenericAdaptorBase(wmma_bf16_16x16x32_bf16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_bf16_16x16x32_bf16GenericAdaptorBase::getSignAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signA);
  return attr;
}

bool wmma_bf16_16x16x32_bf16GenericAdaptorBase::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_bf16_16x16x32_bf16GenericAdaptorBase::getSignBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signB);
  return attr;
}

bool wmma_bf16_16x16x32_bf16GenericAdaptorBase::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_bf16_16x16x32_bf16GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_bf16_16x16x32_bf16GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_bf16_16x16x32_bf16GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_bf16_16x16x32_bf16GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_bf16_16x16x32_bf16GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_bf16_16x16x32_bf16GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_bf16_16x16x32_bf16Adaptor::wmma_bf16_16x16x32_bf16Adaptor(wmma_bf16_16x16x32_bf16 op) : wmma_bf16_16x16x32_bf16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_bf16_16x16x32_bf16Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (tblgen_signA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.bf16.16x16x32.bf16' op attribute 'signA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_signB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.bf16.16x16x32.bf16' op attribute 'signB' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.bf16.16x16x32.bf16' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.bf16.16x16x32.bf16' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.bf16.16x16x32.bf16' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_bf16_16x16x32_bf16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signA;
       auto attr = dict.get("signA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signB;
       auto attr = dict.get("signB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_bf16_16x16x32_bf16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_bf16_16x16x32_bf16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()), 
    llvm::hash_value(prop.signA.getAsOpaquePointer()), 
    llvm::hash_value(prop.signB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_bf16_16x16x32_bf16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;

    if (name == "signA")
      return prop.signA;

    if (name == "signB")
      return prop.signB;
  return std::nullopt;
}

void wmma_bf16_16x16x32_bf16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }

    if (name == "signA") {
       prop.signA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signA)>>(value);
       return;
    }

    if (name == "signB") {
       prop.signB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signB)>>(value);
       return;
    }
}

void wmma_bf16_16x16x32_bf16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);

    if (prop.signA) attrs.append("signA", prop.signA);

    if (prop.signB) attrs.append("signB", prop.signB);
}

::llvm::LogicalResult wmma_bf16_16x16x32_bf16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_bf16_16x16x32_bf16::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_bf16_16x16x32_bf16::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);

  writer.writeOptionalAttribute(prop.signA);

  writer.writeOptionalAttribute(prop.signB);
}

bool wmma_bf16_16x16x32_bf16::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_bf16_16x16x32_bf16::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

uint16_t wmma_bf16_16x16x32_bf16::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_bf16_16x16x32_bf16::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_bf16_16x16x32_bf16::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_bf16_16x16x32_bf16::setSignA(bool attrValue) {
  getProperties().signA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_bf16_16x16x32_bf16::setSignB(bool attrValue) {
  getProperties().signB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_bf16_16x16x32_bf16::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_bf16_16x16x32_bf16::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_bf16_16x16x32_bf16::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_bf16_16x16x32_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_bf16_16x16x32_bf16 wmma_bf16_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16_16x16x32_bf16 wmma_bf16_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_bf16_16x16x32_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_bf16_16x16x32_bf16 wmma_bf16_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16_16x16x32_bf16 wmma_bf16_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_bf16_16x16x32_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_bf16_16x16x32_bf16 wmma_bf16_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16_16x16x32_bf16 wmma_bf16_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_bf16_16x16x32_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_bf16_16x16x32_bf16 wmma_bf16_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16_16x16x32_bf16 wmma_bf16_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_bf16_16x16x32_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_bf16_16x16x32_bf16::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_bf16_16x16x32_bf16 wmma_bf16_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16_16x16x32_bf16 wmma_bf16_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_bf16_16x16x32_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_bf16_16x16x32_bf16 wmma_bf16_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16_16x16x32_bf16 wmma_bf16_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_bf16_16x16x32_bf16::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.signA)
    properties.signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.signB)
    properties.signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_bf16_16x16x32_bf16::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signA, "signA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signB, "signB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps35(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps35(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps35(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps35(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_bf16_16x16x32_bf16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_bf16_16x16x32_bf16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_bf16_16x16x32_bf16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_bf16_16x16x32_bf16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_bf16f32_16x16x32_bf16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_bf16f32_16x16x32_bf16GenericAdaptorBase::wmma_bf16f32_16x16x32_bf16GenericAdaptorBase(wmma_bf16f32_16x16x32_bf16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_bf16f32_16x16x32_bf16GenericAdaptorBase::getSignAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signA);
  return attr;
}

bool wmma_bf16f32_16x16x32_bf16GenericAdaptorBase::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_bf16f32_16x16x32_bf16GenericAdaptorBase::getSignBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signB);
  return attr;
}

bool wmma_bf16f32_16x16x32_bf16GenericAdaptorBase::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_bf16f32_16x16x32_bf16GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_bf16f32_16x16x32_bf16GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_bf16f32_16x16x32_bf16GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_bf16f32_16x16x32_bf16GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_bf16f32_16x16x32_bf16GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_bf16f32_16x16x32_bf16GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_bf16f32_16x16x32_bf16Adaptor::wmma_bf16f32_16x16x32_bf16Adaptor(wmma_bf16f32_16x16x32_bf16 op) : wmma_bf16f32_16x16x32_bf16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_bf16f32_16x16x32_bf16Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (tblgen_signA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.bf16f32.16x16x32.bf16' op attribute 'signA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_signB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.bf16f32.16x16x32.bf16' op attribute 'signB' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.bf16f32.16x16x32.bf16' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.bf16f32.16x16x32.bf16' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.bf16f32.16x16x32.bf16' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_bf16f32_16x16x32_bf16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signA;
       auto attr = dict.get("signA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signB;
       auto attr = dict.get("signB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_bf16f32_16x16x32_bf16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_bf16f32_16x16x32_bf16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()), 
    llvm::hash_value(prop.signA.getAsOpaquePointer()), 
    llvm::hash_value(prop.signB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_bf16f32_16x16x32_bf16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;

    if (name == "signA")
      return prop.signA;

    if (name == "signB")
      return prop.signB;
  return std::nullopt;
}

void wmma_bf16f32_16x16x32_bf16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }

    if (name == "signA") {
       prop.signA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signA)>>(value);
       return;
    }

    if (name == "signB") {
       prop.signB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signB)>>(value);
       return;
    }
}

void wmma_bf16f32_16x16x32_bf16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);

    if (prop.signA) attrs.append("signA", prop.signA);

    if (prop.signB) attrs.append("signB", prop.signB);
}

::llvm::LogicalResult wmma_bf16f32_16x16x32_bf16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_bf16f32_16x16x32_bf16::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_bf16f32_16x16x32_bf16::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);

  writer.writeOptionalAttribute(prop.signA);

  writer.writeOptionalAttribute(prop.signB);
}

bool wmma_bf16f32_16x16x32_bf16::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_bf16f32_16x16x32_bf16::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

uint16_t wmma_bf16f32_16x16x32_bf16::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_bf16f32_16x16x32_bf16::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_bf16f32_16x16x32_bf16::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_bf16f32_16x16x32_bf16::setSignA(bool attrValue) {
  getProperties().signA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_bf16f32_16x16x32_bf16::setSignB(bool attrValue) {
  getProperties().signB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_bf16f32_16x16x32_bf16::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_bf16f32_16x16x32_bf16::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_bf16f32_16x16x32_bf16::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_bf16f32_16x16x32_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_bf16f32_16x16x32_bf16 wmma_bf16f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16f32_16x16x32_bf16 wmma_bf16f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_bf16f32_16x16x32_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_bf16f32_16x16x32_bf16 wmma_bf16f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16f32_16x16x32_bf16 wmma_bf16f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_bf16f32_16x16x32_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_bf16f32_16x16x32_bf16 wmma_bf16f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16f32_16x16x32_bf16 wmma_bf16f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_bf16f32_16x16x32_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_bf16f32_16x16x32_bf16 wmma_bf16f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16f32_16x16x32_bf16 wmma_bf16f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_bf16f32_16x16x32_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_bf16f32_16x16x32_bf16::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_bf16f32_16x16x32_bf16 wmma_bf16f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16f32_16x16x32_bf16 wmma_bf16f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_bf16f32_16x16x32_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_bf16f32_16x16x32_bf16 wmma_bf16f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_bf16f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_bf16f32_16x16x32_bf16 wmma_bf16f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_bf16f32_16x16x32_bf16::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.signA)
    properties.signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.signB)
    properties.signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_bf16f32_16x16x32_bf16::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signA, "signA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signB, "signB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps35(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps35(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps35(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_bf16f32_16x16x32_bf16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_bf16f32_16x16x32_bf16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_bf16f32_16x16x32_bf16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_bf16f32_16x16x32_bf16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f16_16x16x128_bf8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f16_16x16x128_bf8_bf8GenericAdaptorBase::wmma_f16_16x16x128_bf8_bf8GenericAdaptorBase(wmma_f16_16x16x128_bf8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f16_16x16x128_bf8_bf8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f16_16x16x128_bf8_bf8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x128_bf8_bf8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f16_16x16x128_bf8_bf8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x128_bf8_bf8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f16_16x16x128_bf8_bf8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f16_16x16x128_bf8_bf8Adaptor::wmma_f16_16x16x128_bf8_bf8Adaptor(wmma_f16_16x16x128_bf8_bf8 op) : wmma_f16_16x16x128_bf8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f16_16x16x128_bf8_bf8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x128.bf8_bf8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x128.bf8_bf8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x128.bf8_bf8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x128_bf8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f16_16x16x128_bf8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f16_16x16x128_bf8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f16_16x16x128_bf8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f16_16x16x128_bf8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f16_16x16x128_bf8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f16_16x16x128_bf8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x128_bf8_bf8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x128_bf8_bf8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f16_16x16x128_bf8_bf8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x128_bf8_bf8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x128_bf8_bf8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f16_16x16x128_bf8_bf8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f16_16x16x128_bf8_bf8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x128_bf8_bf8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x128_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f16_16x16x128_bf8_bf8 wmma_f16_16x16x128_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_bf8_bf8 wmma_f16_16x16x128_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x128_bf8_bf8 wmma_f16_16x16x128_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_bf8_bf8 wmma_f16_16x16x128_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f16_16x16x128_bf8_bf8 wmma_f16_16x16x128_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_bf8_bf8 wmma_f16_16x16x128_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x128_bf8_bf8 wmma_f16_16x16x128_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_bf8_bf8 wmma_f16_16x16x128_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f16_16x16x128_bf8_bf8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f16_16x16x128_bf8_bf8 wmma_f16_16x16x128_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_bf8_bf8 wmma_f16_16x16x128_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f16_16x16x128_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x128_bf8_bf8 wmma_f16_16x16x128_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_bf8_bf8 wmma_f16_16x16x128_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f16_16x16x128_bf8_bf8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f16_16x16x128_bf8_bf8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x128_bf8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f16_16x16x128_bf8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x128_bf8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f16_16x16x128_bf8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f16_16x16x128_bf8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f16_16x16x128_bf8_fp8GenericAdaptorBase::wmma_f16_16x16x128_bf8_fp8GenericAdaptorBase(wmma_f16_16x16x128_bf8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f16_16x16x128_bf8_fp8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f16_16x16x128_bf8_fp8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x128_bf8_fp8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f16_16x16x128_bf8_fp8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x128_bf8_fp8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f16_16x16x128_bf8_fp8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f16_16x16x128_bf8_fp8Adaptor::wmma_f16_16x16x128_bf8_fp8Adaptor(wmma_f16_16x16x128_bf8_fp8 op) : wmma_f16_16x16x128_bf8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f16_16x16x128_bf8_fp8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x128.bf8_fp8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x128.bf8_fp8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x128.bf8_fp8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x128_bf8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f16_16x16x128_bf8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f16_16x16x128_bf8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f16_16x16x128_bf8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f16_16x16x128_bf8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f16_16x16x128_bf8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f16_16x16x128_bf8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x128_bf8_fp8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x128_bf8_fp8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f16_16x16x128_bf8_fp8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x128_bf8_fp8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x128_bf8_fp8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f16_16x16x128_bf8_fp8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f16_16x16x128_bf8_fp8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x128_bf8_fp8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x128_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f16_16x16x128_bf8_fp8 wmma_f16_16x16x128_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_bf8_fp8 wmma_f16_16x16x128_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x128_bf8_fp8 wmma_f16_16x16x128_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_bf8_fp8 wmma_f16_16x16x128_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f16_16x16x128_bf8_fp8 wmma_f16_16x16x128_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_bf8_fp8 wmma_f16_16x16x128_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x128_bf8_fp8 wmma_f16_16x16x128_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_bf8_fp8 wmma_f16_16x16x128_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f16_16x16x128_bf8_fp8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f16_16x16x128_bf8_fp8 wmma_f16_16x16x128_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_bf8_fp8 wmma_f16_16x16x128_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f16_16x16x128_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x128_bf8_fp8 wmma_f16_16x16x128_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_bf8_fp8 wmma_f16_16x16x128_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f16_16x16x128_bf8_fp8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f16_16x16x128_bf8_fp8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x128_bf8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f16_16x16x128_bf8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x128_bf8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f16_16x16x128_bf8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f16_16x16x128_fp8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f16_16x16x128_fp8_bf8GenericAdaptorBase::wmma_f16_16x16x128_fp8_bf8GenericAdaptorBase(wmma_f16_16x16x128_fp8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f16_16x16x128_fp8_bf8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f16_16x16x128_fp8_bf8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x128_fp8_bf8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f16_16x16x128_fp8_bf8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x128_fp8_bf8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f16_16x16x128_fp8_bf8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f16_16x16x128_fp8_bf8Adaptor::wmma_f16_16x16x128_fp8_bf8Adaptor(wmma_f16_16x16x128_fp8_bf8 op) : wmma_f16_16x16x128_fp8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f16_16x16x128_fp8_bf8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x128.fp8_bf8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x128.fp8_bf8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x128.fp8_bf8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x128_fp8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f16_16x16x128_fp8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f16_16x16x128_fp8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f16_16x16x128_fp8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f16_16x16x128_fp8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f16_16x16x128_fp8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f16_16x16x128_fp8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x128_fp8_bf8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x128_fp8_bf8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f16_16x16x128_fp8_bf8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x128_fp8_bf8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x128_fp8_bf8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f16_16x16x128_fp8_bf8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f16_16x16x128_fp8_bf8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x128_fp8_bf8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x128_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f16_16x16x128_fp8_bf8 wmma_f16_16x16x128_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_fp8_bf8 wmma_f16_16x16x128_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x128_fp8_bf8 wmma_f16_16x16x128_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_fp8_bf8 wmma_f16_16x16x128_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f16_16x16x128_fp8_bf8 wmma_f16_16x16x128_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_fp8_bf8 wmma_f16_16x16x128_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x128_fp8_bf8 wmma_f16_16x16x128_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_fp8_bf8 wmma_f16_16x16x128_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f16_16x16x128_fp8_bf8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f16_16x16x128_fp8_bf8 wmma_f16_16x16x128_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_fp8_bf8 wmma_f16_16x16x128_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f16_16x16x128_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x128_fp8_bf8 wmma_f16_16x16x128_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_fp8_bf8 wmma_f16_16x16x128_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f16_16x16x128_fp8_bf8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f16_16x16x128_fp8_bf8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x128_fp8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f16_16x16x128_fp8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x128_fp8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f16_16x16x128_fp8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f16_16x16x128_fp8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f16_16x16x128_fp8_fp8GenericAdaptorBase::wmma_f16_16x16x128_fp8_fp8GenericAdaptorBase(wmma_f16_16x16x128_fp8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f16_16x16x128_fp8_fp8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f16_16x16x128_fp8_fp8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x128_fp8_fp8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f16_16x16x128_fp8_fp8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x128_fp8_fp8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f16_16x16x128_fp8_fp8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f16_16x16x128_fp8_fp8Adaptor::wmma_f16_16x16x128_fp8_fp8Adaptor(wmma_f16_16x16x128_fp8_fp8 op) : wmma_f16_16x16x128_fp8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f16_16x16x128_fp8_fp8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x128.fp8_fp8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x128.fp8_fp8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x128.fp8_fp8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x128_fp8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f16_16x16x128_fp8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f16_16x16x128_fp8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f16_16x16x128_fp8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f16_16x16x128_fp8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f16_16x16x128_fp8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f16_16x16x128_fp8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x128_fp8_fp8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x128_fp8_fp8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f16_16x16x128_fp8_fp8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x128_fp8_fp8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x128_fp8_fp8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f16_16x16x128_fp8_fp8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f16_16x16x128_fp8_fp8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x128_fp8_fp8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x128_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f16_16x16x128_fp8_fp8 wmma_f16_16x16x128_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_fp8_fp8 wmma_f16_16x16x128_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x128_fp8_fp8 wmma_f16_16x16x128_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_fp8_fp8 wmma_f16_16x16x128_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f16_16x16x128_fp8_fp8 wmma_f16_16x16x128_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_fp8_fp8 wmma_f16_16x16x128_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x128_fp8_fp8 wmma_f16_16x16x128_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_fp8_fp8 wmma_f16_16x16x128_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x128_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f16_16x16x128_fp8_fp8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f16_16x16x128_fp8_fp8 wmma_f16_16x16x128_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_fp8_fp8 wmma_f16_16x16x128_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f16_16x16x128_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x128_fp8_fp8 wmma_f16_16x16x128_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x128_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x128_fp8_fp8 wmma_f16_16x16x128_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f16_16x16x128_fp8_fp8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f16_16x16x128_fp8_fp8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x128_fp8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f16_16x16x128_fp8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x128_fp8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f16_16x16x128_fp8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f16_16x16x16_f16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f16_16x16x16_f16GenericAdaptorBase::wmma_f16_16x16x16_f16GenericAdaptorBase(wmma_f16_16x16x16_f16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f16_16x16x16_f16GenericAdaptorBase::getOpselAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().opsel);
  return attr;
}

bool wmma_f16_16x16x16_f16GenericAdaptorBase::getOpsel() {
  auto attr = getOpselAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f16_16x16x16_f16Adaptor::wmma_f16_16x16x16_f16Adaptor(wmma_f16_16x16x16_f16 op) : wmma_f16_16x16x16_f16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f16_16x16x16_f16Adaptor::verify(::mlir::Location loc) {
  auto tblgen_opsel = getProperties().opsel; (void)tblgen_opsel;

  if (tblgen_opsel && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_opsel))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_opsel).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x16.f16' op attribute 'opsel' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x16_f16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.opsel;
       auto attr = dict.get("opsel");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `opsel` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f16_16x16x16_f16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.opsel;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("opsel",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f16_16x16x16_f16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.opsel.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f16_16x16x16_f16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "opsel")
      return prop.opsel;
  return std::nullopt;
}

void wmma_f16_16x16x16_f16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "opsel") {
       prop.opsel = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.opsel)>>(value);
       return;
    }
}

void wmma_f16_16x16x16_f16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.opsel) attrs.append("opsel", prop.opsel);
}

::llvm::LogicalResult wmma_f16_16x16x16_f16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getOpselAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "opsel", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x16_f16::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.opsel)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x16_f16::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.opsel);
}

bool wmma_f16_16x16x16_f16::getOpsel() {
  auto attr = getOpselAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f16_16x16x16_f16::setOpsel(bool attrValue) {
  getProperties().opsel = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x16_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr opsel) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (opsel) {
    odsState.getOrAddProperties<Properties>().opsel = opsel;
  }
  odsState.addTypes(res);
}

wmma_f16_16x16x16_f16 wmma_f16_16x16x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr opsel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, c, opsel);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x16_f16 wmma_f16_16x16x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr opsel) {
  return create(builder, builder.getLoc(), res, a, b, c, opsel);
}

void wmma_f16_16x16x16_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr opsel) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (opsel) {
    odsState.getOrAddProperties<Properties>().opsel = opsel;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x16_f16 wmma_f16_16x16x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr opsel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, c, opsel);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x16_f16 wmma_f16_16x16x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr opsel) {
  return create(builder, builder.getLoc(), resultTypes, a, b, c, opsel);
}

void wmma_f16_16x16x16_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, bool opsel) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().opsel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), opsel);
  odsState.addTypes(res);
}

wmma_f16_16x16x16_f16 wmma_f16_16x16x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, bool opsel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, c, opsel);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x16_f16 wmma_f16_16x16x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, bool opsel) {
  return create(builder, builder.getLoc(), res, a, b, c, opsel);
}

void wmma_f16_16x16x16_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, bool opsel) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().opsel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), opsel);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x16_f16 wmma_f16_16x16x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, bool opsel) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, c, opsel);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x16_f16 wmma_f16_16x16x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, bool opsel) {
  return create(builder, builder.getLoc(), resultTypes, a, b, c, opsel);
}

void wmma_f16_16x16x16_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f16_16x16x16_f16::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f16_16x16x16_f16 wmma_f16_16x16x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x16_f16 wmma_f16_16x16x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f16_16x16x16_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x16_f16 wmma_f16_16x16x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x16_f16 wmma_f16_16x16x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f16_16x16x16_f16::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.opsel)
    properties.opsel = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f16_16x16x16_f16::verifyInvariantsImpl() {
  auto tblgen_opsel = getProperties().opsel; (void)tblgen_opsel;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_opsel, "opsel")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x16_f16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f16_16x16x16_f16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x16_f16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getOpselAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("opsel");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f16_16x16x16_f16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f16_16x16x32_f16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f16_16x16x32_f16GenericAdaptorBase::wmma_f16_16x16x32_f16GenericAdaptorBase(wmma_f16_16x16x32_f16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f16_16x16x32_f16GenericAdaptorBase::getSignAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signA);
  return attr;
}

bool wmma_f16_16x16x32_f16GenericAdaptorBase::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x32_f16GenericAdaptorBase::getSignBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signB);
  return attr;
}

bool wmma_f16_16x16x32_f16GenericAdaptorBase::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x32_f16GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f16_16x16x32_f16GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x32_f16GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f16_16x16x32_f16GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x32_f16GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f16_16x16x32_f16GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f16_16x16x32_f16Adaptor::wmma_f16_16x16x32_f16Adaptor(wmma_f16_16x16x32_f16 op) : wmma_f16_16x16x32_f16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f16_16x16x32_f16Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (tblgen_signA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x32.f16' op attribute 'signA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_signB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x32.f16' op attribute 'signB' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x32.f16' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x32.f16' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x32.f16' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x32_f16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signA;
       auto attr = dict.get("signA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signB;
       auto attr = dict.get("signB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f16_16x16x32_f16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f16_16x16x32_f16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()), 
    llvm::hash_value(prop.signA.getAsOpaquePointer()), 
    llvm::hash_value(prop.signB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f16_16x16x32_f16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;

    if (name == "signA")
      return prop.signA;

    if (name == "signB")
      return prop.signB;
  return std::nullopt;
}

void wmma_f16_16x16x32_f16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }

    if (name == "signA") {
       prop.signA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signA)>>(value);
       return;
    }

    if (name == "signB") {
       prop.signB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signB)>>(value);
       return;
    }
}

void wmma_f16_16x16x32_f16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);

    if (prop.signA) attrs.append("signA", prop.signA);

    if (prop.signB) attrs.append("signB", prop.signB);
}

::llvm::LogicalResult wmma_f16_16x16x32_f16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x32_f16::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x32_f16::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);

  writer.writeOptionalAttribute(prop.signA);

  writer.writeOptionalAttribute(prop.signB);
}

bool wmma_f16_16x16x32_f16::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x32_f16::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

uint16_t wmma_f16_16x16x32_f16::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x32_f16::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x32_f16::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f16_16x16x32_f16::setSignA(bool attrValue) {
  getProperties().signA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x32_f16::setSignB(bool attrValue) {
  getProperties().signB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x32_f16::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f16_16x16x32_f16::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x32_f16::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x32_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f16_16x16x32_f16 wmma_f16_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x32_f16 wmma_f16_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x32_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x32_f16 wmma_f16_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x32_f16 wmma_f16_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x32_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f16_16x16x32_f16 wmma_f16_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x32_f16 wmma_f16_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x32_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x32_f16 wmma_f16_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x32_f16 wmma_f16_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x32_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f16_16x16x32_f16::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f16_16x16x32_f16 wmma_f16_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x32_f16 wmma_f16_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f16_16x16x32_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x32_f16 wmma_f16_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x32_f16 wmma_f16_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f16_16x16x32_f16::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.signA)
    properties.signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.signB)
    properties.signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f16_16x16x32_f16::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signA, "signA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signB, "signB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x32_f16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f16_16x16x32_f16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x32_f16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f16_16x16x32_f16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f16_16x16x64_bf8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f16_16x16x64_bf8_bf8GenericAdaptorBase::wmma_f16_16x16x64_bf8_bf8GenericAdaptorBase(wmma_f16_16x16x64_bf8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f16_16x16x64_bf8_bf8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f16_16x16x64_bf8_bf8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x64_bf8_bf8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f16_16x16x64_bf8_bf8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x64_bf8_bf8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f16_16x16x64_bf8_bf8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f16_16x16x64_bf8_bf8Adaptor::wmma_f16_16x16x64_bf8_bf8Adaptor(wmma_f16_16x16x64_bf8_bf8 op) : wmma_f16_16x16x64_bf8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f16_16x16x64_bf8_bf8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x64.bf8_bf8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x64.bf8_bf8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x64.bf8_bf8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x64_bf8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f16_16x16x64_bf8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f16_16x16x64_bf8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f16_16x16x64_bf8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f16_16x16x64_bf8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f16_16x16x64_bf8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f16_16x16x64_bf8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x64_bf8_bf8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x64_bf8_bf8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f16_16x16x64_bf8_bf8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x64_bf8_bf8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x64_bf8_bf8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f16_16x16x64_bf8_bf8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f16_16x16x64_bf8_bf8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x64_bf8_bf8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x64_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f16_16x16x64_bf8_bf8 wmma_f16_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_bf8_bf8 wmma_f16_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x64_bf8_bf8 wmma_f16_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_bf8_bf8 wmma_f16_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f16_16x16x64_bf8_bf8 wmma_f16_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_bf8_bf8 wmma_f16_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x64_bf8_bf8 wmma_f16_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_bf8_bf8 wmma_f16_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f16_16x16x64_bf8_bf8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f16_16x16x64_bf8_bf8 wmma_f16_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_bf8_bf8 wmma_f16_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f16_16x16x64_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x64_bf8_bf8 wmma_f16_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_bf8_bf8 wmma_f16_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f16_16x16x64_bf8_bf8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f16_16x16x64_bf8_bf8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x64_bf8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f16_16x16x64_bf8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x64_bf8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f16_16x16x64_bf8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f16_16x16x64_bf8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f16_16x16x64_bf8_fp8GenericAdaptorBase::wmma_f16_16x16x64_bf8_fp8GenericAdaptorBase(wmma_f16_16x16x64_bf8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f16_16x16x64_bf8_fp8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f16_16x16x64_bf8_fp8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x64_bf8_fp8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f16_16x16x64_bf8_fp8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x64_bf8_fp8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f16_16x16x64_bf8_fp8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f16_16x16x64_bf8_fp8Adaptor::wmma_f16_16x16x64_bf8_fp8Adaptor(wmma_f16_16x16x64_bf8_fp8 op) : wmma_f16_16x16x64_bf8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f16_16x16x64_bf8_fp8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x64.bf8_fp8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x64.bf8_fp8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x64.bf8_fp8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x64_bf8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f16_16x16x64_bf8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f16_16x16x64_bf8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f16_16x16x64_bf8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f16_16x16x64_bf8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f16_16x16x64_bf8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f16_16x16x64_bf8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x64_bf8_fp8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x64_bf8_fp8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f16_16x16x64_bf8_fp8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x64_bf8_fp8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x64_bf8_fp8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f16_16x16x64_bf8_fp8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f16_16x16x64_bf8_fp8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x64_bf8_fp8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x64_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f16_16x16x64_bf8_fp8 wmma_f16_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_bf8_fp8 wmma_f16_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x64_bf8_fp8 wmma_f16_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_bf8_fp8 wmma_f16_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f16_16x16x64_bf8_fp8 wmma_f16_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_bf8_fp8 wmma_f16_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x64_bf8_fp8 wmma_f16_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_bf8_fp8 wmma_f16_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f16_16x16x64_bf8_fp8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f16_16x16x64_bf8_fp8 wmma_f16_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_bf8_fp8 wmma_f16_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f16_16x16x64_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x64_bf8_fp8 wmma_f16_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_bf8_fp8 wmma_f16_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f16_16x16x64_bf8_fp8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f16_16x16x64_bf8_fp8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x64_bf8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f16_16x16x64_bf8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x64_bf8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f16_16x16x64_bf8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f16_16x16x64_fp8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f16_16x16x64_fp8_bf8GenericAdaptorBase::wmma_f16_16x16x64_fp8_bf8GenericAdaptorBase(wmma_f16_16x16x64_fp8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f16_16x16x64_fp8_bf8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f16_16x16x64_fp8_bf8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x64_fp8_bf8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f16_16x16x64_fp8_bf8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x64_fp8_bf8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f16_16x16x64_fp8_bf8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f16_16x16x64_fp8_bf8Adaptor::wmma_f16_16x16x64_fp8_bf8Adaptor(wmma_f16_16x16x64_fp8_bf8 op) : wmma_f16_16x16x64_fp8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f16_16x16x64_fp8_bf8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x64.fp8_bf8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x64.fp8_bf8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x64.fp8_bf8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x64_fp8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f16_16x16x64_fp8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f16_16x16x64_fp8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f16_16x16x64_fp8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f16_16x16x64_fp8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f16_16x16x64_fp8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f16_16x16x64_fp8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x64_fp8_bf8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x64_fp8_bf8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f16_16x16x64_fp8_bf8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x64_fp8_bf8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x64_fp8_bf8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f16_16x16x64_fp8_bf8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f16_16x16x64_fp8_bf8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x64_fp8_bf8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x64_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f16_16x16x64_fp8_bf8 wmma_f16_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_fp8_bf8 wmma_f16_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x64_fp8_bf8 wmma_f16_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_fp8_bf8 wmma_f16_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f16_16x16x64_fp8_bf8 wmma_f16_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_fp8_bf8 wmma_f16_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x64_fp8_bf8 wmma_f16_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_fp8_bf8 wmma_f16_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f16_16x16x64_fp8_bf8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f16_16x16x64_fp8_bf8 wmma_f16_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_fp8_bf8 wmma_f16_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f16_16x16x64_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x64_fp8_bf8 wmma_f16_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_fp8_bf8 wmma_f16_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f16_16x16x64_fp8_bf8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f16_16x16x64_fp8_bf8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x64_fp8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f16_16x16x64_fp8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x64_fp8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f16_16x16x64_fp8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f16_16x16x64_fp8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f16_16x16x64_fp8_fp8GenericAdaptorBase::wmma_f16_16x16x64_fp8_fp8GenericAdaptorBase(wmma_f16_16x16x64_fp8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f16_16x16x64_fp8_fp8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f16_16x16x64_fp8_fp8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x64_fp8_fp8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f16_16x16x64_fp8_fp8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f16_16x16x64_fp8_fp8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f16_16x16x64_fp8_fp8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f16_16x16x64_fp8_fp8Adaptor::wmma_f16_16x16x64_fp8_fp8Adaptor(wmma_f16_16x16x64_fp8_fp8 op) : wmma_f16_16x16x64_fp8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f16_16x16x64_fp8_fp8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x64.fp8_fp8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x64.fp8_fp8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f16.16x16x64.fp8_fp8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x64_fp8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f16_16x16x64_fp8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f16_16x16x64_fp8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f16_16x16x64_fp8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f16_16x16x64_fp8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f16_16x16x64_fp8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f16_16x16x64_fp8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x64_fp8_fp8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x64_fp8_fp8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f16_16x16x64_fp8_fp8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x64_fp8_fp8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f16_16x16x64_fp8_fp8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f16_16x16x64_fp8_fp8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f16_16x16x64_fp8_fp8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x64_fp8_fp8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f16_16x16x64_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f16_16x16x64_fp8_fp8 wmma_f16_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_fp8_fp8 wmma_f16_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x64_fp8_fp8 wmma_f16_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_fp8_fp8 wmma_f16_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f16_16x16x64_fp8_fp8 wmma_f16_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_fp8_fp8 wmma_f16_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x64_fp8_fp8 wmma_f16_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_fp8_fp8 wmma_f16_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f16_16x16x64_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f16_16x16x64_fp8_fp8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f16_16x16x64_fp8_fp8 wmma_f16_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_fp8_fp8 wmma_f16_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f16_16x16x64_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f16_16x16x64_fp8_fp8 wmma_f16_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f16_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f16_16x16x64_fp8_fp8 wmma_f16_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f16_16x16x64_fp8_fp8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f16_16x16x64_fp8_fp8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f16_16x16x64_fp8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f16_16x16x64_fp8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f16_16x16x64_fp8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f16_16x16x64_fp8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x128_bf8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x128_bf8_bf8GenericAdaptorBase::wmma_f32_16x16x128_bf8_bf8GenericAdaptorBase(wmma_f32_16x16x128_bf8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f32_16x16x128_bf8_bf8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f32_16x16x128_bf8_bf8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x128_bf8_bf8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f32_16x16x128_bf8_bf8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x128_bf8_bf8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f32_16x16x128_bf8_bf8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f32_16x16x128_bf8_bf8Adaptor::wmma_f32_16x16x128_bf8_bf8Adaptor(wmma_f32_16x16x128_bf8_bf8 op) : wmma_f32_16x16x128_bf8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x128_bf8_bf8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x128.bf8_bf8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x128.bf8_bf8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x128.bf8_bf8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x128_bf8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x128_bf8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x128_bf8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f32_16x16x128_bf8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f32_16x16x128_bf8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f32_16x16x128_bf8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f32_16x16x128_bf8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x128_bf8_bf8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x128_bf8_bf8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f32_16x16x128_bf8_bf8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x128_bf8_bf8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x128_bf8_bf8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f32_16x16x128_bf8_bf8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f32_16x16x128_bf8_bf8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x128_bf8_bf8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x128_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f32_16x16x128_bf8_bf8 wmma_f32_16x16x128_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_bf8_bf8 wmma_f32_16x16x128_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x128_bf8_bf8 wmma_f32_16x16x128_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_bf8_bf8 wmma_f32_16x16x128_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f32_16x16x128_bf8_bf8 wmma_f32_16x16x128_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_bf8_bf8 wmma_f32_16x16x128_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x128_bf8_bf8 wmma_f32_16x16x128_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_bf8_bf8 wmma_f32_16x16x128_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f32_16x16x128_bf8_bf8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f32_16x16x128_bf8_bf8 wmma_f32_16x16x128_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_bf8_bf8 wmma_f32_16x16x128_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x128_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x128_bf8_bf8 wmma_f32_16x16x128_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_bf8_bf8 wmma_f32_16x16x128_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f32_16x16x128_bf8_bf8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f32_16x16x128_bf8_bf8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x128_bf8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x128_bf8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x128_bf8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x128_bf8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x128_bf8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x128_bf8_fp8GenericAdaptorBase::wmma_f32_16x16x128_bf8_fp8GenericAdaptorBase(wmma_f32_16x16x128_bf8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f32_16x16x128_bf8_fp8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f32_16x16x128_bf8_fp8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x128_bf8_fp8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f32_16x16x128_bf8_fp8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x128_bf8_fp8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f32_16x16x128_bf8_fp8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f32_16x16x128_bf8_fp8Adaptor::wmma_f32_16x16x128_bf8_fp8Adaptor(wmma_f32_16x16x128_bf8_fp8 op) : wmma_f32_16x16x128_bf8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x128_bf8_fp8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x128.bf8_fp8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x128.bf8_fp8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x128.bf8_fp8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x128_bf8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x128_bf8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x128_bf8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f32_16x16x128_bf8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f32_16x16x128_bf8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f32_16x16x128_bf8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f32_16x16x128_bf8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x128_bf8_fp8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x128_bf8_fp8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f32_16x16x128_bf8_fp8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x128_bf8_fp8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x128_bf8_fp8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f32_16x16x128_bf8_fp8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f32_16x16x128_bf8_fp8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x128_bf8_fp8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x128_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f32_16x16x128_bf8_fp8 wmma_f32_16x16x128_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_bf8_fp8 wmma_f32_16x16x128_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x128_bf8_fp8 wmma_f32_16x16x128_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_bf8_fp8 wmma_f32_16x16x128_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f32_16x16x128_bf8_fp8 wmma_f32_16x16x128_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_bf8_fp8 wmma_f32_16x16x128_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x128_bf8_fp8 wmma_f32_16x16x128_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_bf8_fp8 wmma_f32_16x16x128_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f32_16x16x128_bf8_fp8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f32_16x16x128_bf8_fp8 wmma_f32_16x16x128_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_bf8_fp8 wmma_f32_16x16x128_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x128_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x128_bf8_fp8 wmma_f32_16x16x128_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_bf8_fp8 wmma_f32_16x16x128_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f32_16x16x128_bf8_fp8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f32_16x16x128_bf8_fp8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x128_bf8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x128_bf8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x128_bf8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x128_bf8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x128_fp8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x128_fp8_bf8GenericAdaptorBase::wmma_f32_16x16x128_fp8_bf8GenericAdaptorBase(wmma_f32_16x16x128_fp8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f32_16x16x128_fp8_bf8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f32_16x16x128_fp8_bf8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x128_fp8_bf8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f32_16x16x128_fp8_bf8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x128_fp8_bf8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f32_16x16x128_fp8_bf8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f32_16x16x128_fp8_bf8Adaptor::wmma_f32_16x16x128_fp8_bf8Adaptor(wmma_f32_16x16x128_fp8_bf8 op) : wmma_f32_16x16x128_fp8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x128_fp8_bf8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x128.fp8_bf8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x128.fp8_bf8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x128.fp8_bf8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x128_fp8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x128_fp8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x128_fp8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f32_16x16x128_fp8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f32_16x16x128_fp8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f32_16x16x128_fp8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f32_16x16x128_fp8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x128_fp8_bf8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x128_fp8_bf8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f32_16x16x128_fp8_bf8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x128_fp8_bf8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x128_fp8_bf8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f32_16x16x128_fp8_bf8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f32_16x16x128_fp8_bf8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x128_fp8_bf8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x128_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f32_16x16x128_fp8_bf8 wmma_f32_16x16x128_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_fp8_bf8 wmma_f32_16x16x128_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x128_fp8_bf8 wmma_f32_16x16x128_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_fp8_bf8 wmma_f32_16x16x128_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f32_16x16x128_fp8_bf8 wmma_f32_16x16x128_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_fp8_bf8 wmma_f32_16x16x128_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x128_fp8_bf8 wmma_f32_16x16x128_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_fp8_bf8 wmma_f32_16x16x128_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f32_16x16x128_fp8_bf8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f32_16x16x128_fp8_bf8 wmma_f32_16x16x128_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_fp8_bf8 wmma_f32_16x16x128_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x128_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x128_fp8_bf8 wmma_f32_16x16x128_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_fp8_bf8 wmma_f32_16x16x128_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f32_16x16x128_fp8_bf8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f32_16x16x128_fp8_bf8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x128_fp8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x128_fp8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x128_fp8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x128_fp8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x128_fp8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x128_fp8_fp8GenericAdaptorBase::wmma_f32_16x16x128_fp8_fp8GenericAdaptorBase(wmma_f32_16x16x128_fp8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f32_16x16x128_fp8_fp8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f32_16x16x128_fp8_fp8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x128_fp8_fp8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f32_16x16x128_fp8_fp8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x128_fp8_fp8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f32_16x16x128_fp8_fp8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f32_16x16x128_fp8_fp8Adaptor::wmma_f32_16x16x128_fp8_fp8Adaptor(wmma_f32_16x16x128_fp8_fp8 op) : wmma_f32_16x16x128_fp8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x128_fp8_fp8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x128.fp8_fp8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x128.fp8_fp8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x128.fp8_fp8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x128_fp8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x128_fp8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x128_fp8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f32_16x16x128_fp8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f32_16x16x128_fp8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f32_16x16x128_fp8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f32_16x16x128_fp8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x128_fp8_fp8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x128_fp8_fp8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f32_16x16x128_fp8_fp8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x128_fp8_fp8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x128_fp8_fp8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f32_16x16x128_fp8_fp8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f32_16x16x128_fp8_fp8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x128_fp8_fp8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x128_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f32_16x16x128_fp8_fp8 wmma_f32_16x16x128_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_fp8_fp8 wmma_f32_16x16x128_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x128_fp8_fp8 wmma_f32_16x16x128_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_fp8_fp8 wmma_f32_16x16x128_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f32_16x16x128_fp8_fp8 wmma_f32_16x16x128_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_fp8_fp8 wmma_f32_16x16x128_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x128_fp8_fp8 wmma_f32_16x16x128_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_fp8_fp8 wmma_f32_16x16x128_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x128_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f32_16x16x128_fp8_fp8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f32_16x16x128_fp8_fp8 wmma_f32_16x16x128_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_fp8_fp8 wmma_f32_16x16x128_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x128_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x128_fp8_fp8 wmma_f32_16x16x128_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x128_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x128_fp8_fp8 wmma_f32_16x16x128_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f32_16x16x128_fp8_fp8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f32_16x16x128_fp8_fp8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x128_fp8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x128_fp8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x128_fp8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x128_fp8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x16_bf16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x16_bf16GenericAdaptorBase::wmma_f32_16x16x16_bf16GenericAdaptorBase(wmma_f32_16x16x16_bf16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
wmma_f32_16x16x16_bf16Adaptor::wmma_f32_16x16x16_bf16Adaptor(wmma_f32_16x16x16_bf16 op) : wmma_f32_16x16x16_bf16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x16_bf16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x16_bf16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x16_bf16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x16_bf16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> wmma_f32_16x16x16_bf16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void wmma_f32_16x16x16_bf16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void wmma_f32_16x16x16_bf16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult wmma_f32_16x16x16_bf16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void wmma_f32_16x16x16_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addTypes(res);
}

wmma_f32_16x16x16_bf16 wmma_f32_16x16x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, c);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_bf16 wmma_f32_16x16x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  return create(builder, builder.getLoc(), res, a, b, c);
}

void wmma_f32_16x16x16_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_bf16 wmma_f32_16x16x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, c);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_bf16 wmma_f32_16x16x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  return create(builder, builder.getLoc(), resultTypes, a, b, c);
}

void wmma_f32_16x16x16_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_bf16 wmma_f32_16x16x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_bf16 wmma_f32_16x16x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x16_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_bf16 wmma_f32_16x16x16_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_bf16 wmma_f32_16x16x16_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult wmma_f32_16x16x16_bf16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x16_bf16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x16_bf16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x16_bf16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x16_bf16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x16_bf8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x16_bf8_bf8GenericAdaptorBase::wmma_f32_16x16x16_bf8_bf8GenericAdaptorBase(wmma_f32_16x16x16_bf8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
wmma_f32_16x16x16_bf8_bf8Adaptor::wmma_f32_16x16x16_bf8_bf8Adaptor(wmma_f32_16x16x16_bf8_bf8 op) : wmma_f32_16x16x16_bf8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x16_bf8_bf8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x16_bf8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x16_bf8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x16_bf8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> wmma_f32_16x16x16_bf8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void wmma_f32_16x16x16_bf8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void wmma_f32_16x16x16_bf8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult wmma_f32_16x16x16_bf8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void wmma_f32_16x16x16_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addTypes(res);
}

wmma_f32_16x16x16_bf8_bf8 wmma_f32_16x16x16_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, c);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_bf8_bf8 wmma_f32_16x16x16_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  return create(builder, builder.getLoc(), res, a, b, c);
}

void wmma_f32_16x16x16_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_bf8_bf8 wmma_f32_16x16x16_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, c);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_bf8_bf8 wmma_f32_16x16x16_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  return create(builder, builder.getLoc(), resultTypes, a, b, c);
}

void wmma_f32_16x16x16_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_bf8_bf8 wmma_f32_16x16x16_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_bf8_bf8 wmma_f32_16x16x16_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x16_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_bf8_bf8 wmma_f32_16x16x16_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_bf8_bf8 wmma_f32_16x16x16_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult wmma_f32_16x16x16_bf8_bf8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x16_bf8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x16_bf8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x16_bf8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x16_bf8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x16_bf8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x16_bf8_fp8GenericAdaptorBase::wmma_f32_16x16x16_bf8_fp8GenericAdaptorBase(wmma_f32_16x16x16_bf8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
wmma_f32_16x16x16_bf8_fp8Adaptor::wmma_f32_16x16x16_bf8_fp8Adaptor(wmma_f32_16x16x16_bf8_fp8 op) : wmma_f32_16x16x16_bf8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x16_bf8_fp8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x16_bf8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x16_bf8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x16_bf8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> wmma_f32_16x16x16_bf8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void wmma_f32_16x16x16_bf8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void wmma_f32_16x16x16_bf8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult wmma_f32_16x16x16_bf8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void wmma_f32_16x16x16_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addTypes(res);
}

wmma_f32_16x16x16_bf8_fp8 wmma_f32_16x16x16_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, c);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_bf8_fp8 wmma_f32_16x16x16_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  return create(builder, builder.getLoc(), res, a, b, c);
}

void wmma_f32_16x16x16_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_bf8_fp8 wmma_f32_16x16x16_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, c);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_bf8_fp8 wmma_f32_16x16x16_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  return create(builder, builder.getLoc(), resultTypes, a, b, c);
}

void wmma_f32_16x16x16_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_bf8_fp8 wmma_f32_16x16x16_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_bf8_fp8 wmma_f32_16x16x16_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x16_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_bf8_fp8 wmma_f32_16x16x16_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_bf8_fp8 wmma_f32_16x16x16_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult wmma_f32_16x16x16_bf8_fp8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x16_bf8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x16_bf8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x16_bf8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x16_bf8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x16_f16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x16_f16GenericAdaptorBase::wmma_f32_16x16x16_f16GenericAdaptorBase(wmma_f32_16x16x16_f16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
wmma_f32_16x16x16_f16Adaptor::wmma_f32_16x16x16_f16Adaptor(wmma_f32_16x16x16_f16 op) : wmma_f32_16x16x16_f16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x16_f16Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x16_f16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x16_f16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x16_f16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> wmma_f32_16x16x16_f16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void wmma_f32_16x16x16_f16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void wmma_f32_16x16x16_f16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult wmma_f32_16x16x16_f16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void wmma_f32_16x16x16_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addTypes(res);
}

wmma_f32_16x16x16_f16 wmma_f32_16x16x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, c);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_f16 wmma_f32_16x16x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  return create(builder, builder.getLoc(), res, a, b, c);
}

void wmma_f32_16x16x16_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_f16 wmma_f32_16x16x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, c);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_f16 wmma_f32_16x16x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  return create(builder, builder.getLoc(), resultTypes, a, b, c);
}

void wmma_f32_16x16x16_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_f16 wmma_f32_16x16x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_f16 wmma_f32_16x16x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x16_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_f16 wmma_f32_16x16x16_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_f16 wmma_f32_16x16x16_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult wmma_f32_16x16x16_f16::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x16_f16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x16_f16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x16_f16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x16_f16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x16_fp8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x16_fp8_bf8GenericAdaptorBase::wmma_f32_16x16x16_fp8_bf8GenericAdaptorBase(wmma_f32_16x16x16_fp8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
wmma_f32_16x16x16_fp8_bf8Adaptor::wmma_f32_16x16x16_fp8_bf8Adaptor(wmma_f32_16x16x16_fp8_bf8 op) : wmma_f32_16x16x16_fp8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x16_fp8_bf8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x16_fp8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x16_fp8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x16_fp8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> wmma_f32_16x16x16_fp8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void wmma_f32_16x16x16_fp8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void wmma_f32_16x16x16_fp8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult wmma_f32_16x16x16_fp8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void wmma_f32_16x16x16_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addTypes(res);
}

wmma_f32_16x16x16_fp8_bf8 wmma_f32_16x16x16_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, c);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_fp8_bf8 wmma_f32_16x16x16_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  return create(builder, builder.getLoc(), res, a, b, c);
}

void wmma_f32_16x16x16_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_fp8_bf8 wmma_f32_16x16x16_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, c);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_fp8_bf8 wmma_f32_16x16x16_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  return create(builder, builder.getLoc(), resultTypes, a, b, c);
}

void wmma_f32_16x16x16_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_fp8_bf8 wmma_f32_16x16x16_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_fp8_bf8 wmma_f32_16x16x16_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x16_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_fp8_bf8 wmma_f32_16x16x16_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_fp8_bf8 wmma_f32_16x16x16_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult wmma_f32_16x16x16_fp8_bf8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x16_fp8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x16_fp8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x16_fp8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x16_fp8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x16_fp8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x16_fp8_fp8GenericAdaptorBase::wmma_f32_16x16x16_fp8_fp8GenericAdaptorBase(wmma_f32_16x16x16_fp8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
wmma_f32_16x16x16_fp8_fp8Adaptor::wmma_f32_16x16x16_fp8_fp8Adaptor(wmma_f32_16x16x16_fp8_fp8 op) : wmma_f32_16x16x16_fp8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x16_fp8_fp8Adaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x16_fp8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x16_fp8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x16_fp8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> wmma_f32_16x16x16_fp8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void wmma_f32_16x16x16_fp8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void wmma_f32_16x16x16_fp8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult wmma_f32_16x16x16_fp8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void wmma_f32_16x16x16_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addTypes(res);
}

wmma_f32_16x16x16_fp8_fp8 wmma_f32_16x16x16_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, c);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_fp8_fp8 wmma_f32_16x16x16_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  return create(builder, builder.getLoc(), res, a, b, c);
}

void wmma_f32_16x16x16_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_fp8_fp8 wmma_f32_16x16x16_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, c);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_fp8_fp8 wmma_f32_16x16x16_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c) {
  return create(builder, builder.getLoc(), resultTypes, a, b, c);
}

void wmma_f32_16x16x16_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_fp8_fp8 wmma_f32_16x16x16_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_fp8_fp8 wmma_f32_16x16x16_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x16_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x16_fp8_fp8 wmma_f32_16x16x16_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x16_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x16_fp8_fp8 wmma_f32_16x16x16_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

::llvm::LogicalResult wmma_f32_16x16x16_fp8_fp8::verifyInvariantsImpl() {
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x16_fp8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x16_fp8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x16_fp8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x16_fp8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x32_bf16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x32_bf16GenericAdaptorBase::wmma_f32_16x16x32_bf16GenericAdaptorBase(wmma_f32_16x16x32_bf16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f32_16x16x32_bf16GenericAdaptorBase::getSignAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signA);
  return attr;
}

bool wmma_f32_16x16x32_bf16GenericAdaptorBase::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x32_bf16GenericAdaptorBase::getSignBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signB);
  return attr;
}

bool wmma_f32_16x16x32_bf16GenericAdaptorBase::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x32_bf16GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f32_16x16x32_bf16GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x32_bf16GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f32_16x16x32_bf16GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x32_bf16GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f32_16x16x32_bf16GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f32_16x16x32_bf16Adaptor::wmma_f32_16x16x32_bf16Adaptor(wmma_f32_16x16x32_bf16 op) : wmma_f32_16x16x32_bf16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x32_bf16Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (tblgen_signA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x32.bf16' op attribute 'signA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_signB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x32.bf16' op attribute 'signB' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x32.bf16' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x32.bf16' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x32.bf16' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x32_bf16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signA;
       auto attr = dict.get("signA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signB;
       auto attr = dict.get("signB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x32_bf16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x32_bf16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()), 
    llvm::hash_value(prop.signA.getAsOpaquePointer()), 
    llvm::hash_value(prop.signB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f32_16x16x32_bf16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;

    if (name == "signA")
      return prop.signA;

    if (name == "signB")
      return prop.signB;
  return std::nullopt;
}

void wmma_f32_16x16x32_bf16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }

    if (name == "signA") {
       prop.signA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signA)>>(value);
       return;
    }

    if (name == "signB") {
       prop.signB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signB)>>(value);
       return;
    }
}

void wmma_f32_16x16x32_bf16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);

    if (prop.signA) attrs.append("signA", prop.signA);

    if (prop.signB) attrs.append("signB", prop.signB);
}

::llvm::LogicalResult wmma_f32_16x16x32_bf16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x32_bf16::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x32_bf16::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);

  writer.writeOptionalAttribute(prop.signA);

  writer.writeOptionalAttribute(prop.signB);
}

bool wmma_f32_16x16x32_bf16::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x32_bf16::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

uint16_t wmma_f32_16x16x32_bf16::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x32_bf16::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x32_bf16::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f32_16x16x32_bf16::setSignA(bool attrValue) {
  getProperties().signA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x32_bf16::setSignB(bool attrValue) {
  getProperties().signB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x32_bf16::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f32_16x16x32_bf16::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x32_bf16::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x32_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f32_16x16x32_bf16 wmma_f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x32_bf16 wmma_f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x32_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x32_bf16 wmma_f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x32_bf16 wmma_f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x32_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f32_16x16x32_bf16 wmma_f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x32_bf16 wmma_f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x32_bf16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x32_bf16 wmma_f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x32_bf16 wmma_f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x32_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f32_16x16x32_bf16::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f32_16x16x32_bf16 wmma_f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x32_bf16 wmma_f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x32_bf16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x32_bf16 wmma_f32_16x16x32_bf16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x32_bf16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x32_bf16 wmma_f32_16x16x32_bf16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f32_16x16x32_bf16::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.signA)
    properties.signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.signB)
    properties.signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f32_16x16x32_bf16::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signA, "signA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signB, "signB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps35(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps35(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x32_bf16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x32_bf16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x32_bf16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x32_bf16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x32_f16 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x32_f16GenericAdaptorBase::wmma_f32_16x16x32_f16GenericAdaptorBase(wmma_f32_16x16x32_f16 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f32_16x16x32_f16GenericAdaptorBase::getSignAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signA);
  return attr;
}

bool wmma_f32_16x16x32_f16GenericAdaptorBase::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x32_f16GenericAdaptorBase::getSignBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signB);
  return attr;
}

bool wmma_f32_16x16x32_f16GenericAdaptorBase::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x32_f16GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f32_16x16x32_f16GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x32_f16GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f32_16x16x32_f16GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x32_f16GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f32_16x16x32_f16GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f32_16x16x32_f16Adaptor::wmma_f32_16x16x32_f16Adaptor(wmma_f32_16x16x32_f16 op) : wmma_f32_16x16x32_f16GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x32_f16Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (tblgen_signA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x32.f16' op attribute 'signA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_signB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x32.f16' op attribute 'signB' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x32.f16' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x32.f16' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x32.f16' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x32_f16::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signA;
       auto attr = dict.get("signA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signB;
       auto attr = dict.get("signB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x32_f16::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x32_f16::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()), 
    llvm::hash_value(prop.signA.getAsOpaquePointer()), 
    llvm::hash_value(prop.signB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f32_16x16x32_f16::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;

    if (name == "signA")
      return prop.signA;

    if (name == "signB")
      return prop.signB;
  return std::nullopt;
}

void wmma_f32_16x16x32_f16::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }

    if (name == "signA") {
       prop.signA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signA)>>(value);
       return;
    }

    if (name == "signB") {
       prop.signB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signB)>>(value);
       return;
    }
}

void wmma_f32_16x16x32_f16::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);

    if (prop.signA) attrs.append("signA", prop.signA);

    if (prop.signB) attrs.append("signB", prop.signB);
}

::llvm::LogicalResult wmma_f32_16x16x32_f16::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x32_f16::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x32_f16::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);

  writer.writeOptionalAttribute(prop.signA);

  writer.writeOptionalAttribute(prop.signB);
}

bool wmma_f32_16x16x32_f16::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x32_f16::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

uint16_t wmma_f32_16x16x32_f16::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x32_f16::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x32_f16::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f32_16x16x32_f16::setSignA(bool attrValue) {
  getProperties().signA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x32_f16::setSignB(bool attrValue) {
  getProperties().signB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x32_f16::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f32_16x16x32_f16::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x32_f16::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x32_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f32_16x16x32_f16 wmma_f32_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x32_f16 wmma_f32_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x32_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x32_f16 wmma_f32_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x32_f16 wmma_f32_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x32_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f32_16x16x32_f16 wmma_f32_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x32_f16 wmma_f32_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x32_f16::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x32_f16 wmma_f32_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x32_f16 wmma_f32_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x32_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f32_16x16x32_f16::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f32_16x16x32_f16 wmma_f32_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x32_f16 wmma_f32_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x32_f16::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x32_f16 wmma_f32_16x16x32_f16::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x32_f16>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x32_f16 wmma_f32_16x16x32_f16::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f32_16x16x32_f16::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.signA)
    properties.signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.signB)
    properties.signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f32_16x16x32_f16::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signA, "signA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signB, "signB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps37(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x32_f16::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x32_f16::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x32_f16::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x32_f16)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x4_f32 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x4_f32GenericAdaptorBase::wmma_f32_16x16x4_f32GenericAdaptorBase(wmma_f32_16x16x4_f32 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f32_16x16x4_f32GenericAdaptorBase::getSignAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signA);
  return attr;
}

bool wmma_f32_16x16x4_f32GenericAdaptorBase::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x4_f32GenericAdaptorBase::getSignBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signB);
  return attr;
}

bool wmma_f32_16x16x4_f32GenericAdaptorBase::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x4_f32GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f32_16x16x4_f32GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x4_f32GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f32_16x16x4_f32GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x4_f32GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f32_16x16x4_f32GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f32_16x16x4_f32Adaptor::wmma_f32_16x16x4_f32Adaptor(wmma_f32_16x16x4_f32 op) : wmma_f32_16x16x4_f32GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x4_f32Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (tblgen_signA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x4.f32' op attribute 'signA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_signB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x4.f32' op attribute 'signB' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x4.f32' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x4.f32' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x4.f32' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x4_f32::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signA;
       auto attr = dict.get("signA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signB;
       auto attr = dict.get("signB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x4_f32::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x4_f32::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()), 
    llvm::hash_value(prop.signA.getAsOpaquePointer()), 
    llvm::hash_value(prop.signB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f32_16x16x4_f32::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;

    if (name == "signA")
      return prop.signA;

    if (name == "signB")
      return prop.signB;
  return std::nullopt;
}

void wmma_f32_16x16x4_f32::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }

    if (name == "signA") {
       prop.signA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signA)>>(value);
       return;
    }

    if (name == "signB") {
       prop.signB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signB)>>(value);
       return;
    }
}

void wmma_f32_16x16x4_f32::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);

    if (prop.signA) attrs.append("signA", prop.signA);

    if (prop.signB) attrs.append("signB", prop.signB);
}

::llvm::LogicalResult wmma_f32_16x16x4_f32::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x4_f32::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x4_f32::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);

  writer.writeOptionalAttribute(prop.signA);

  writer.writeOptionalAttribute(prop.signB);
}

bool wmma_f32_16x16x4_f32::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x4_f32::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

uint16_t wmma_f32_16x16x4_f32::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x4_f32::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x4_f32::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f32_16x16x4_f32::setSignA(bool attrValue) {
  getProperties().signA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x4_f32::setSignB(bool attrValue) {
  getProperties().signB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x4_f32::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f32_16x16x4_f32::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x4_f32::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x4_f32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f32_16x16x4_f32 wmma_f32_16x16x4_f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x4_f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x4_f32 wmma_f32_16x16x4_f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x4_f32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x4_f32 wmma_f32_16x16x4_f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x4_f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x4_f32 wmma_f32_16x16x4_f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x4_f32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f32_16x16x4_f32 wmma_f32_16x16x4_f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x4_f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x4_f32 wmma_f32_16x16x4_f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x4_f32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x4_f32 wmma_f32_16x16x4_f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x4_f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x4_f32 wmma_f32_16x16x4_f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x4_f32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f32_16x16x4_f32::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f32_16x16x4_f32 wmma_f32_16x16x4_f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x4_f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x4_f32 wmma_f32_16x16x4_f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x4_f32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x4_f32 wmma_f32_16x16x4_f32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x4_f32>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x4_f32 wmma_f32_16x16x4_f32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f32_16x16x4_f32::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.signA)
    properties.signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.signB)
    properties.signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f32_16x16x4_f32::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signA, "signA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signB, "signB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x4_f32::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x4_f32::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x4_f32::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x4_f32)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x64_bf8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x64_bf8_bf8GenericAdaptorBase::wmma_f32_16x16x64_bf8_bf8GenericAdaptorBase(wmma_f32_16x16x64_bf8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f32_16x16x64_bf8_bf8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f32_16x16x64_bf8_bf8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x64_bf8_bf8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f32_16x16x64_bf8_bf8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x64_bf8_bf8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f32_16x16x64_bf8_bf8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f32_16x16x64_bf8_bf8Adaptor::wmma_f32_16x16x64_bf8_bf8Adaptor(wmma_f32_16x16x64_bf8_bf8 op) : wmma_f32_16x16x64_bf8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x64_bf8_bf8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x64.bf8_bf8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x64.bf8_bf8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x64.bf8_bf8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x64_bf8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x64_bf8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x64_bf8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f32_16x16x64_bf8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f32_16x16x64_bf8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f32_16x16x64_bf8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f32_16x16x64_bf8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x64_bf8_bf8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x64_bf8_bf8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f32_16x16x64_bf8_bf8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x64_bf8_bf8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x64_bf8_bf8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f32_16x16x64_bf8_bf8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f32_16x16x64_bf8_bf8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x64_bf8_bf8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x64_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f32_16x16x64_bf8_bf8 wmma_f32_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_bf8_bf8 wmma_f32_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x64_bf8_bf8 wmma_f32_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_bf8_bf8 wmma_f32_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f32_16x16x64_bf8_bf8 wmma_f32_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_bf8_bf8 wmma_f32_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_bf8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x64_bf8_bf8 wmma_f32_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_bf8_bf8 wmma_f32_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f32_16x16x64_bf8_bf8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f32_16x16x64_bf8_bf8 wmma_f32_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_bf8_bf8 wmma_f32_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x64_bf8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x64_bf8_bf8 wmma_f32_16x16x64_bf8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_bf8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_bf8_bf8 wmma_f32_16x16x64_bf8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f32_16x16x64_bf8_bf8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f32_16x16x64_bf8_bf8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x64_bf8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x64_bf8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x64_bf8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x64_bf8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x64_bf8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x64_bf8_fp8GenericAdaptorBase::wmma_f32_16x16x64_bf8_fp8GenericAdaptorBase(wmma_f32_16x16x64_bf8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f32_16x16x64_bf8_fp8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f32_16x16x64_bf8_fp8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x64_bf8_fp8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f32_16x16x64_bf8_fp8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x64_bf8_fp8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f32_16x16x64_bf8_fp8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f32_16x16x64_bf8_fp8Adaptor::wmma_f32_16x16x64_bf8_fp8Adaptor(wmma_f32_16x16x64_bf8_fp8 op) : wmma_f32_16x16x64_bf8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x64_bf8_fp8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x64.bf8_fp8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x64.bf8_fp8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x64.bf8_fp8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x64_bf8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x64_bf8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x64_bf8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f32_16x16x64_bf8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f32_16x16x64_bf8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f32_16x16x64_bf8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f32_16x16x64_bf8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x64_bf8_fp8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x64_bf8_fp8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f32_16x16x64_bf8_fp8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x64_bf8_fp8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x64_bf8_fp8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f32_16x16x64_bf8_fp8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f32_16x16x64_bf8_fp8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x64_bf8_fp8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x64_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f32_16x16x64_bf8_fp8 wmma_f32_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_bf8_fp8 wmma_f32_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x64_bf8_fp8 wmma_f32_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_bf8_fp8 wmma_f32_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f32_16x16x64_bf8_fp8 wmma_f32_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_bf8_fp8 wmma_f32_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_bf8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x64_bf8_fp8 wmma_f32_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_bf8_fp8 wmma_f32_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f32_16x16x64_bf8_fp8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f32_16x16x64_bf8_fp8 wmma_f32_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_bf8_fp8 wmma_f32_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x64_bf8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x64_bf8_fp8 wmma_f32_16x16x64_bf8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_bf8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_bf8_fp8 wmma_f32_16x16x64_bf8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f32_16x16x64_bf8_fp8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f32_16x16x64_bf8_fp8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x64_bf8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x64_bf8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x64_bf8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x64_bf8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x64_fp8_bf8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x64_fp8_bf8GenericAdaptorBase::wmma_f32_16x16x64_fp8_bf8GenericAdaptorBase(wmma_f32_16x16x64_fp8_bf8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f32_16x16x64_fp8_bf8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f32_16x16x64_fp8_bf8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x64_fp8_bf8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f32_16x16x64_fp8_bf8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x64_fp8_bf8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f32_16x16x64_fp8_bf8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f32_16x16x64_fp8_bf8Adaptor::wmma_f32_16x16x64_fp8_bf8Adaptor(wmma_f32_16x16x64_fp8_bf8 op) : wmma_f32_16x16x64_fp8_bf8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x64_fp8_bf8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x64.fp8_bf8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x64.fp8_bf8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x64.fp8_bf8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x64_fp8_bf8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x64_fp8_bf8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x64_fp8_bf8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f32_16x16x64_fp8_bf8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f32_16x16x64_fp8_bf8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f32_16x16x64_fp8_bf8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f32_16x16x64_fp8_bf8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x64_fp8_bf8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x64_fp8_bf8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f32_16x16x64_fp8_bf8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x64_fp8_bf8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x64_fp8_bf8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f32_16x16x64_fp8_bf8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f32_16x16x64_fp8_bf8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x64_fp8_bf8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x64_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f32_16x16x64_fp8_bf8 wmma_f32_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_fp8_bf8 wmma_f32_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x64_fp8_bf8 wmma_f32_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_fp8_bf8 wmma_f32_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f32_16x16x64_fp8_bf8 wmma_f32_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_fp8_bf8 wmma_f32_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_fp8_bf8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x64_fp8_bf8 wmma_f32_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_fp8_bf8 wmma_f32_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f32_16x16x64_fp8_bf8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f32_16x16x64_fp8_bf8 wmma_f32_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_fp8_bf8 wmma_f32_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x64_fp8_bf8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x64_fp8_bf8 wmma_f32_16x16x64_fp8_bf8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_fp8_bf8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_fp8_bf8 wmma_f32_16x16x64_fp8_bf8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f32_16x16x64_fp8_bf8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f32_16x16x64_fp8_bf8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x64_fp8_bf8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x64_fp8_bf8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x64_fp8_bf8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x64_fp8_bf8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_f32_16x16x64_fp8_fp8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_f32_16x16x64_fp8_fp8GenericAdaptorBase::wmma_f32_16x16x64_fp8_fp8GenericAdaptorBase(wmma_f32_16x16x64_fp8_fp8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_f32_16x16x64_fp8_fp8GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_f32_16x16x64_fp8_fp8GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x64_fp8_fp8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_f32_16x16x64_fp8_fp8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_f32_16x16x64_fp8_fp8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_f32_16x16x64_fp8_fp8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_f32_16x16x64_fp8_fp8Adaptor::wmma_f32_16x16x64_fp8_fp8Adaptor(wmma_f32_16x16x64_fp8_fp8 op) : wmma_f32_16x16x64_fp8_fp8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_f32_16x16x64_fp8_fp8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x64.fp8_fp8' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x64.fp8_fp8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.f32.16x16x64.fp8_fp8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x64_fp8_fp8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_f32_16x16x64_fp8_fp8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_f32_16x16x64_fp8_fp8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_f32_16x16x64_fp8_fp8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;
  return std::nullopt;
}

void wmma_f32_16x16x64_fp8_fp8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }
}

void wmma_f32_16x16x64_fp8_fp8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);
}

::llvm::LogicalResult wmma_f32_16x16x64_fp8_fp8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x64_fp8_fp8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x64_fp8_fp8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);
}

uint16_t wmma_f32_16x16x64_fp8_fp8::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x64_fp8_fp8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_f32_16x16x64_fp8_fp8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_f32_16x16x64_fp8_fp8::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_f32_16x16x64_fp8_fp8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x64_fp8_fp8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_f32_16x16x64_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_f32_16x16x64_fp8_fp8 wmma_f32_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_fp8_fp8 wmma_f32_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x64_fp8_fp8 wmma_f32_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_fp8_fp8 wmma_f32_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_f32_16x16x64_fp8_fp8 wmma_f32_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_fp8_fp8 wmma_f32_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_fp8_fp8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x64_fp8_fp8 wmma_f32_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_fp8_fp8 wmma_f32_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, reuseA, reuseB);
}

void wmma_f32_16x16x64_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_f32_16x16x64_fp8_fp8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_f32_16x16x64_fp8_fp8 wmma_f32_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_fp8_fp8 wmma_f32_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_f32_16x16x64_fp8_fp8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_f32_16x16x64_fp8_fp8 wmma_f32_16x16x64_fp8_fp8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_f32_16x16x64_fp8_fp8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_f32_16x16x64_fp8_fp8 wmma_f32_16x16x64_fp8_fp8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_f32_16x16x64_fp8_fp8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_f32_16x16x64_fp8_fp8::verifyInvariantsImpl() {
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_f32_16x16x64_fp8_fp8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_f32_16x16x64_fp8_fp8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_f32_16x16x64_fp8_fp8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_f32_16x16x64_fp8_fp8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_i32_16x16x16_iu4 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_i32_16x16x16_iu4GenericAdaptorBase::wmma_i32_16x16x16_iu4GenericAdaptorBase(wmma_i32_16x16x16_iu4 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_i32_16x16x16_iu4GenericAdaptorBase::getSignAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signA);
  return attr;
}

bool wmma_i32_16x16x16_iu4GenericAdaptorBase::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_i32_16x16x16_iu4GenericAdaptorBase::getSignBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signB);
  return attr;
}

bool wmma_i32_16x16x16_iu4GenericAdaptorBase::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_i32_16x16x16_iu4GenericAdaptorBase::getClampAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().clamp);
  return attr;
}

bool wmma_i32_16x16x16_iu4GenericAdaptorBase::getClamp() {
  auto attr = getClampAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_i32_16x16x16_iu4Adaptor::wmma_i32_16x16x16_iu4Adaptor(wmma_i32_16x16x16_iu4 op) : wmma_i32_16x16x16_iu4GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_i32_16x16x16_iu4Adaptor::verify(::mlir::Location loc) {
  auto tblgen_clamp = getProperties().clamp; (void)tblgen_clamp;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (tblgen_signA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.i32.16x16x16.iu4' op attribute 'signA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_signB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.i32.16x16x16.iu4' op attribute 'signB' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_clamp && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_clamp))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_clamp).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.i32.16x16x16.iu4' op attribute 'clamp' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_i32_16x16x16_iu4::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.clamp;
       auto attr = dict.get("clamp");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `clamp` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signA;
       auto attr = dict.get("signA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signB;
       auto attr = dict.get("signB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_i32_16x16x16_iu4::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.clamp;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("clamp",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_i32_16x16x16_iu4::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.clamp.getAsOpaquePointer()), 
    llvm::hash_value(prop.signA.getAsOpaquePointer()), 
    llvm::hash_value(prop.signB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_i32_16x16x16_iu4::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "clamp")
      return prop.clamp;

    if (name == "signA")
      return prop.signA;

    if (name == "signB")
      return prop.signB;
  return std::nullopt;
}

void wmma_i32_16x16x16_iu4::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "clamp") {
       prop.clamp = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.clamp)>>(value);
       return;
    }

    if (name == "signA") {
       prop.signA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signA)>>(value);
       return;
    }

    if (name == "signB") {
       prop.signB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signB)>>(value);
       return;
    }
}

void wmma_i32_16x16x16_iu4::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.clamp) attrs.append("clamp", prop.clamp);

    if (prop.signA) attrs.append("signA", prop.signA);

    if (prop.signB) attrs.append("signB", prop.signB);
}

::llvm::LogicalResult wmma_i32_16x16x16_iu4::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getClampAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "clamp", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_i32_16x16x16_iu4::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.clamp)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_i32_16x16x16_iu4::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.clamp);

  writer.writeOptionalAttribute(prop.signA);

  writer.writeOptionalAttribute(prop.signB);
}

bool wmma_i32_16x16x16_iu4::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_i32_16x16x16_iu4::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_i32_16x16x16_iu4::getClamp() {
  auto attr = getClampAttr();
  return attr.getValue().getZExtValue();
}

void wmma_i32_16x16x16_iu4::setSignA(bool attrValue) {
  getProperties().signA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_i32_16x16x16_iu4::setSignB(bool attrValue) {
  getProperties().signB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_i32_16x16x16_iu4::setClamp(bool attrValue) {
  getProperties().clamp = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_i32_16x16x16_iu4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (clamp) {
    odsState.getOrAddProperties<Properties>().clamp = clamp;
  }
  odsState.addTypes(res);
}

wmma_i32_16x16x16_iu4 wmma_i32_16x16x16_iu4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, c, clamp);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x16_iu4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x16_iu4 wmma_i32_16x16x16_iu4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, c, clamp);
}

void wmma_i32_16x16x16_iu4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (clamp) {
    odsState.getOrAddProperties<Properties>().clamp = clamp;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_i32_16x16x16_iu4 wmma_i32_16x16x16_iu4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, c, clamp);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x16_iu4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x16_iu4 wmma_i32_16x16x16_iu4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, c, clamp);
}

void wmma_i32_16x16x16_iu4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().clamp = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), clamp);
  odsState.addTypes(res);
}

wmma_i32_16x16x16_iu4 wmma_i32_16x16x16_iu4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, c, clamp);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x16_iu4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x16_iu4 wmma_i32_16x16x16_iu4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, c, clamp);
}

void wmma_i32_16x16x16_iu4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().clamp = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), clamp);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_i32_16x16x16_iu4 wmma_i32_16x16x16_iu4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, c, clamp);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x16_iu4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x16_iu4 wmma_i32_16x16x16_iu4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, c, clamp);
}

void wmma_i32_16x16x16_iu4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_i32_16x16x16_iu4::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_i32_16x16x16_iu4 wmma_i32_16x16x16_iu4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x16_iu4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x16_iu4 wmma_i32_16x16x16_iu4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_i32_16x16x16_iu4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_i32_16x16x16_iu4 wmma_i32_16x16x16_iu4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x16_iu4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x16_iu4 wmma_i32_16x16x16_iu4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_i32_16x16x16_iu4::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.signA)
    properties.signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.signB)
    properties.signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.clamp)
    properties.clamp = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_i32_16x16x16_iu4::verifyInvariantsImpl() {
  auto tblgen_clamp = getProperties().clamp; (void)tblgen_clamp;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signA, "signA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signB, "signB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_clamp, "clamp")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_i32_16x16x16_iu4::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_i32_16x16x16_iu4::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_i32_16x16x16_iu4::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getClampAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("clamp");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_i32_16x16x16_iu4)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_i32_16x16x16_iu8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_i32_16x16x16_iu8GenericAdaptorBase::wmma_i32_16x16x16_iu8GenericAdaptorBase(wmma_i32_16x16x16_iu8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_i32_16x16x16_iu8GenericAdaptorBase::getSignAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signA);
  return attr;
}

bool wmma_i32_16x16x16_iu8GenericAdaptorBase::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_i32_16x16x16_iu8GenericAdaptorBase::getSignBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signB);
  return attr;
}

bool wmma_i32_16x16x16_iu8GenericAdaptorBase::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_i32_16x16x16_iu8GenericAdaptorBase::getClampAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().clamp);
  return attr;
}

bool wmma_i32_16x16x16_iu8GenericAdaptorBase::getClamp() {
  auto attr = getClampAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_i32_16x16x16_iu8Adaptor::wmma_i32_16x16x16_iu8Adaptor(wmma_i32_16x16x16_iu8 op) : wmma_i32_16x16x16_iu8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_i32_16x16x16_iu8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_clamp = getProperties().clamp; (void)tblgen_clamp;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (tblgen_signA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.i32.16x16x16.iu8' op attribute 'signA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_signB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.i32.16x16x16.iu8' op attribute 'signB' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_clamp && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_clamp))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_clamp).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.i32.16x16x16.iu8' op attribute 'clamp' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_i32_16x16x16_iu8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.clamp;
       auto attr = dict.get("clamp");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `clamp` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signA;
       auto attr = dict.get("signA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signB;
       auto attr = dict.get("signB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_i32_16x16x16_iu8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.clamp;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("clamp",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_i32_16x16x16_iu8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.clamp.getAsOpaquePointer()), 
    llvm::hash_value(prop.signA.getAsOpaquePointer()), 
    llvm::hash_value(prop.signB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_i32_16x16x16_iu8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "clamp")
      return prop.clamp;

    if (name == "signA")
      return prop.signA;

    if (name == "signB")
      return prop.signB;
  return std::nullopt;
}

void wmma_i32_16x16x16_iu8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "clamp") {
       prop.clamp = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.clamp)>>(value);
       return;
    }

    if (name == "signA") {
       prop.signA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signA)>>(value);
       return;
    }

    if (name == "signB") {
       prop.signB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signB)>>(value);
       return;
    }
}

void wmma_i32_16x16x16_iu8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.clamp) attrs.append("clamp", prop.clamp);

    if (prop.signA) attrs.append("signA", prop.signA);

    if (prop.signB) attrs.append("signB", prop.signB);
}

::llvm::LogicalResult wmma_i32_16x16x16_iu8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getClampAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "clamp", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_i32_16x16x16_iu8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.clamp)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_i32_16x16x16_iu8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.clamp);

  writer.writeOptionalAttribute(prop.signA);

  writer.writeOptionalAttribute(prop.signB);
}

bool wmma_i32_16x16x16_iu8::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_i32_16x16x16_iu8::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_i32_16x16x16_iu8::getClamp() {
  auto attr = getClampAttr();
  return attr.getValue().getZExtValue();
}

void wmma_i32_16x16x16_iu8::setSignA(bool attrValue) {
  getProperties().signA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_i32_16x16x16_iu8::setSignB(bool attrValue) {
  getProperties().signB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_i32_16x16x16_iu8::setClamp(bool attrValue) {
  getProperties().clamp = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_i32_16x16x16_iu8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (clamp) {
    odsState.getOrAddProperties<Properties>().clamp = clamp;
  }
  odsState.addTypes(res);
}

wmma_i32_16x16x16_iu8 wmma_i32_16x16x16_iu8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, c, clamp);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x16_iu8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x16_iu8 wmma_i32_16x16x16_iu8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, c, clamp);
}

void wmma_i32_16x16x16_iu8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (clamp) {
    odsState.getOrAddProperties<Properties>().clamp = clamp;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_i32_16x16x16_iu8 wmma_i32_16x16x16_iu8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, c, clamp);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x16_iu8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x16_iu8 wmma_i32_16x16x16_iu8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, c, clamp);
}

void wmma_i32_16x16x16_iu8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().clamp = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), clamp);
  odsState.addTypes(res);
}

wmma_i32_16x16x16_iu8 wmma_i32_16x16x16_iu8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, c, clamp);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x16_iu8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x16_iu8 wmma_i32_16x16x16_iu8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, c, clamp);
}

void wmma_i32_16x16x16_iu8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().clamp = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), clamp);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_i32_16x16x16_iu8 wmma_i32_16x16x16_iu8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, c, clamp);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x16_iu8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x16_iu8 wmma_i32_16x16x16_iu8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, c, clamp);
}

void wmma_i32_16x16x16_iu8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_i32_16x16x16_iu8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_i32_16x16x16_iu8 wmma_i32_16x16x16_iu8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x16_iu8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x16_iu8 wmma_i32_16x16x16_iu8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_i32_16x16x16_iu8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_i32_16x16x16_iu8 wmma_i32_16x16x16_iu8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x16_iu8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x16_iu8 wmma_i32_16x16x16_iu8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_i32_16x16x16_iu8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.signA)
    properties.signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.signB)
    properties.signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.clamp)
    properties.clamp = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_i32_16x16x16_iu8::verifyInvariantsImpl() {
  auto tblgen_clamp = getProperties().clamp; (void)tblgen_clamp;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signA, "signA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signB, "signB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_clamp, "clamp")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_i32_16x16x16_iu8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_i32_16x16x16_iu8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_i32_16x16x16_iu8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getClampAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("clamp");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_i32_16x16x16_iu8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_i32_16x16x32_iu4 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_i32_16x16x32_iu4GenericAdaptorBase::wmma_i32_16x16x32_iu4GenericAdaptorBase(wmma_i32_16x16x32_iu4 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_i32_16x16x32_iu4GenericAdaptorBase::getSignAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signA);
  return attr;
}

bool wmma_i32_16x16x32_iu4GenericAdaptorBase::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_i32_16x16x32_iu4GenericAdaptorBase::getSignBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signB);
  return attr;
}

bool wmma_i32_16x16x32_iu4GenericAdaptorBase::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_i32_16x16x32_iu4GenericAdaptorBase::getClampAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().clamp);
  return attr;
}

bool wmma_i32_16x16x32_iu4GenericAdaptorBase::getClamp() {
  auto attr = getClampAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_i32_16x16x32_iu4Adaptor::wmma_i32_16x16x32_iu4Adaptor(wmma_i32_16x16x32_iu4 op) : wmma_i32_16x16x32_iu4GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_i32_16x16x32_iu4Adaptor::verify(::mlir::Location loc) {
  auto tblgen_clamp = getProperties().clamp; (void)tblgen_clamp;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (tblgen_signA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.i32.16x16x32.iu4' op attribute 'signA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_signB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.i32.16x16x32.iu4' op attribute 'signB' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_clamp && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_clamp))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_clamp).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.i32.16x16x32.iu4' op attribute 'clamp' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_i32_16x16x32_iu4::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.clamp;
       auto attr = dict.get("clamp");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `clamp` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signA;
       auto attr = dict.get("signA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signB;
       auto attr = dict.get("signB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_i32_16x16x32_iu4::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.clamp;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("clamp",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_i32_16x16x32_iu4::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.clamp.getAsOpaquePointer()), 
    llvm::hash_value(prop.signA.getAsOpaquePointer()), 
    llvm::hash_value(prop.signB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_i32_16x16x32_iu4::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "clamp")
      return prop.clamp;

    if (name == "signA")
      return prop.signA;

    if (name == "signB")
      return prop.signB;
  return std::nullopt;
}

void wmma_i32_16x16x32_iu4::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "clamp") {
       prop.clamp = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.clamp)>>(value);
       return;
    }

    if (name == "signA") {
       prop.signA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signA)>>(value);
       return;
    }

    if (name == "signB") {
       prop.signB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signB)>>(value);
       return;
    }
}

void wmma_i32_16x16x32_iu4::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.clamp) attrs.append("clamp", prop.clamp);

    if (prop.signA) attrs.append("signA", prop.signA);

    if (prop.signB) attrs.append("signB", prop.signB);
}

::llvm::LogicalResult wmma_i32_16x16x32_iu4::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getClampAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "clamp", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_i32_16x16x32_iu4::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.clamp)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_i32_16x16x32_iu4::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.clamp);

  writer.writeOptionalAttribute(prop.signA);

  writer.writeOptionalAttribute(prop.signB);
}

bool wmma_i32_16x16x32_iu4::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_i32_16x16x32_iu4::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_i32_16x16x32_iu4::getClamp() {
  auto attr = getClampAttr();
  return attr.getValue().getZExtValue();
}

void wmma_i32_16x16x32_iu4::setSignA(bool attrValue) {
  getProperties().signA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_i32_16x16x32_iu4::setSignB(bool attrValue) {
  getProperties().signB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_i32_16x16x32_iu4::setClamp(bool attrValue) {
  getProperties().clamp = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_i32_16x16x32_iu4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (clamp) {
    odsState.getOrAddProperties<Properties>().clamp = clamp;
  }
  odsState.addTypes(res);
}

wmma_i32_16x16x32_iu4 wmma_i32_16x16x32_iu4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, c, clamp);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x32_iu4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x32_iu4 wmma_i32_16x16x32_iu4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, c, clamp);
}

void wmma_i32_16x16x32_iu4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (clamp) {
    odsState.getOrAddProperties<Properties>().clamp = clamp;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_i32_16x16x32_iu4 wmma_i32_16x16x32_iu4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, c, clamp);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x32_iu4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x32_iu4 wmma_i32_16x16x32_iu4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr clamp) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, c, clamp);
}

void wmma_i32_16x16x32_iu4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().clamp = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), clamp);
  odsState.addTypes(res);
}

wmma_i32_16x16x32_iu4 wmma_i32_16x16x32_iu4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, c, clamp);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x32_iu4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x32_iu4 wmma_i32_16x16x32_iu4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, c, clamp);
}

void wmma_i32_16x16x32_iu4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().clamp = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), clamp);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_i32_16x16x32_iu4 wmma_i32_16x16x32_iu4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, c, clamp);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x32_iu4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x32_iu4 wmma_i32_16x16x32_iu4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool clamp) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, c, clamp);
}

void wmma_i32_16x16x32_iu4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_i32_16x16x32_iu4::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_i32_16x16x32_iu4 wmma_i32_16x16x32_iu4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x32_iu4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x32_iu4 wmma_i32_16x16x32_iu4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_i32_16x16x32_iu4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_i32_16x16x32_iu4 wmma_i32_16x16x32_iu4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x32_iu4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x32_iu4 wmma_i32_16x16x32_iu4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_i32_16x16x32_iu4::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.signA)
    properties.signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.signB)
    properties.signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.clamp)
    properties.clamp = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_i32_16x16x32_iu4::verifyInvariantsImpl() {
  auto tblgen_clamp = getProperties().clamp; (void)tblgen_clamp;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signA, "signA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signB, "signB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_clamp, "clamp")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_i32_16x16x32_iu4::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_i32_16x16x32_iu4::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_i32_16x16x32_iu4::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getClampAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("clamp");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_i32_16x16x32_iu4)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_i32_16x16x64_iu8 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_i32_16x16x64_iu8GenericAdaptorBase::wmma_i32_16x16x64_iu8GenericAdaptorBase(wmma_i32_16x16x64_iu8 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_i32_16x16x64_iu8GenericAdaptorBase::getSignAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signA);
  return attr;
}

bool wmma_i32_16x16x64_iu8GenericAdaptorBase::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_i32_16x16x64_iu8GenericAdaptorBase::getSignBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().signB);
  return attr;
}

bool wmma_i32_16x16x64_iu8GenericAdaptorBase::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_i32_16x16x64_iu8GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_i32_16x16x64_iu8GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_i32_16x16x64_iu8GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_i32_16x16x64_iu8GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_i32_16x16x64_iu8Adaptor::wmma_i32_16x16x64_iu8Adaptor(wmma_i32_16x16x64_iu8 op) : wmma_i32_16x16x64_iu8GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_i32_16x16x64_iu8Adaptor::verify(::mlir::Location loc) {
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (tblgen_signA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.i32.16x16x64.iu8' op attribute 'signA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_signB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_signB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_signB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.i32.16x16x64.iu8' op attribute 'signB' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.i32.16x16x64.iu8' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.i32.16x16x64.iu8' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_i32_16x16x64_iu8::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signA;
       auto attr = dict.get("signA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.signB;
       auto attr = dict.get("signB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `signB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_i32_16x16x64_iu8::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.signB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("signB",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_i32_16x16x64_iu8::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()), 
    llvm::hash_value(prop.signA.getAsOpaquePointer()), 
    llvm::hash_value(prop.signB.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_i32_16x16x64_iu8::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;

    if (name == "signA")
      return prop.signA;

    if (name == "signB")
      return prop.signB;
  return std::nullopt;
}

void wmma_i32_16x16x64_iu8::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }

    if (name == "signA") {
       prop.signA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signA)>>(value);
       return;
    }

    if (name == "signB") {
       prop.signB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.signB)>>(value);
       return;
    }
}

void wmma_i32_16x16x64_iu8::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);

    if (prop.signA) attrs.append("signA", prop.signA);

    if (prop.signB) attrs.append("signB", prop.signB);
}

::llvm::LogicalResult wmma_i32_16x16x64_iu8::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getSignBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "signB", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_i32_16x16x64_iu8::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.signB)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_i32_16x16x64_iu8::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);

  writer.writeOptionalAttribute(prop.signA);

  writer.writeOptionalAttribute(prop.signB);
}

bool wmma_i32_16x16x64_iu8::getSignA() {
  auto attr = getSignAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_i32_16x16x64_iu8::getSignB() {
  auto attr = getSignBAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_i32_16x16x64_iu8::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_i32_16x16x64_iu8::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_i32_16x16x64_iu8::setSignA(bool attrValue) {
  getProperties().signA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_i32_16x16x64_iu8::setSignB(bool attrValue) {
  getProperties().signB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_i32_16x16x64_iu8::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_i32_16x16x64_iu8::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_i32_16x16x64_iu8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_i32_16x16x64_iu8 wmma_i32_16x16x64_iu8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x64_iu8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x64_iu8 wmma_i32_16x16x64_iu8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, c, reuseA, reuseB);
}

void wmma_i32_16x16x64_iu8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  if (signA) {
    odsState.getOrAddProperties<Properties>().signA = signA;
  }
  if (signB) {
    odsState.getOrAddProperties<Properties>().signB = signB;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_i32_16x16x64_iu8 wmma_i32_16x16x64_iu8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x64_iu8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x64_iu8 wmma_i32_16x16x64_iu8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr signA, ::mlir::Value a, ::mlir::IntegerAttr signB, ::mlir::Value b, ::mlir::Value c, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, c, reuseA, reuseB);
}

void wmma_i32_16x16x64_iu8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_i32_16x16x64_iu8 wmma_i32_16x16x64_iu8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, signA, a, signB, b, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x64_iu8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x64_iu8 wmma_i32_16x16x64_iu8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, signA, a, signB, b, c, reuseA, reuseB);
}

void wmma_i32_16x16x64_iu8::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.getOrAddProperties<Properties>().signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signA);
  odsState.getOrAddProperties<Properties>().signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), signB);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_i32_16x16x64_iu8 wmma_i32_16x16x64_iu8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, signA, a, signB, b, c, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x64_iu8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x64_iu8 wmma_i32_16x16x64_iu8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, bool signA, ::mlir::Value a, bool signB, ::mlir::Value b, ::mlir::Value c, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, signA, a, signB, b, c, reuseA, reuseB);
}

void wmma_i32_16x16x64_iu8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_i32_16x16x64_iu8::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_i32_16x16x64_iu8 wmma_i32_16x16x64_iu8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x64_iu8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x64_iu8 wmma_i32_16x16x64_iu8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_i32_16x16x64_iu8::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 3u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_i32_16x16x64_iu8 wmma_i32_16x16x64_iu8::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_i32_16x16x64_iu8>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_i32_16x16x64_iu8 wmma_i32_16x16x64_iu8::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_i32_16x16x64_iu8::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.signA)
    properties.signA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.signB)
    properties.signB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_i32_16x16x64_iu8::verifyInvariantsImpl() {
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_signA = getProperties().signA; (void)tblgen_signA;
  auto tblgen_signB = getProperties().signB; (void)tblgen_signB;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signA, "signA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_signB, "signB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_i32_16x16x64_iu8::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_i32_16x16x64_iu8::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_i32_16x16x64_iu8::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSignBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("signB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_i32_16x16x64_iu8)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_scale16_f32_16x16x128_f8f6f4 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase(wmma_scale16_f32_16x16x128_f8f6f4 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().fmtA);
  return attr;
}

uint32_t wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtA() {
  auto attr = getFmtAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().fmtB);
  return attr;
}

uint32_t wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtB() {
  auto attr = getFmtBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getScaleATypeAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().scaleAType);
  return attr;
}

uint32_t wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getScaleAType() {
  auto attr = getScaleATypeAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtScaleAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().fmtScaleA);
  return attr;
}

uint32_t wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtScaleA() {
  auto attr = getFmtScaleAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getScaleBTypeAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().scaleBType);
  return attr;
}

uint32_t wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getScaleBType() {
  auto attr = getScaleBTypeAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtScaleBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().fmtScaleB);
  return attr;
}

uint32_t wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtScaleB() {
  auto attr = getFmtScaleBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_scale16_f32_16x16x128_f8f6f4Adaptor::wmma_scale16_f32_16x16x128_f8f6f4Adaptor(wmma_scale16_f32_16x16x128_f8f6f4 op) : wmma_scale16_f32_16x16x128_f8f6f4GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_scale16_f32_16x16x128_f8f6f4Adaptor::verify(::mlir::Location loc) {
  auto tblgen_fmtA = getProperties().fmtA; (void)tblgen_fmtA;
  auto tblgen_fmtB = getProperties().fmtB; (void)tblgen_fmtB;
  auto tblgen_fmtScaleA = getProperties().fmtScaleA; (void)tblgen_fmtScaleA;
  auto tblgen_fmtScaleB = getProperties().fmtScaleB; (void)tblgen_fmtScaleB;
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_scaleAType = getProperties().scaleAType; (void)tblgen_scaleAType;
  auto tblgen_scaleBType = getProperties().scaleBType; (void)tblgen_scaleBType;

  if (tblgen_fmtA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fmtA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fmtA).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.16x16x128.f8f6f4' op attribute 'fmtA' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_fmtB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fmtB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fmtB).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.16x16x128.f8f6f4' op attribute 'fmtB' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.16x16x128.f8f6f4' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_scaleAType && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleAType))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleAType).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.16x16x128.f8f6f4' op attribute 'scaleAType' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_fmtScaleA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fmtScaleA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fmtScaleA).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.16x16x128.f8f6f4' op attribute 'fmtScaleA' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_scaleBType && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleBType))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleBType).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.16x16x128.f8f6f4' op attribute 'scaleBType' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_fmtScaleB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fmtScaleB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fmtScaleB).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.16x16x128.f8f6f4' op attribute 'fmtScaleB' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.16x16x128.f8f6f4' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.16x16x128.f8f6f4' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_scale16_f32_16x16x128_f8f6f4::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.fmtA;
       auto attr = dict.get("fmtA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fmtA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.fmtB;
       auto attr = dict.get("fmtB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fmtB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.fmtScaleA;
       auto attr = dict.get("fmtScaleA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fmtScaleA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.fmtScaleB;
       auto attr = dict.get("fmtScaleB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fmtScaleB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.scaleAType;
       auto attr = dict.get("scaleAType");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleAType` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.scaleBType;
       auto attr = dict.get("scaleBType");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleBType` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_scale16_f32_16x16x128_f8f6f4::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.fmtA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fmtA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.fmtB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fmtB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.fmtScaleA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fmtScaleA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.fmtScaleB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fmtScaleB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.scaleAType;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleAType",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.scaleBType;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleBType",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_scale16_f32_16x16x128_f8f6f4::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.fmtA.getAsOpaquePointer()), 
    llvm::hash_value(prop.fmtB.getAsOpaquePointer()), 
    llvm::hash_value(prop.fmtScaleA.getAsOpaquePointer()), 
    llvm::hash_value(prop.fmtScaleB.getAsOpaquePointer()), 
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()), 
    llvm::hash_value(prop.scaleAType.getAsOpaquePointer()), 
    llvm::hash_value(prop.scaleBType.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_scale16_f32_16x16x128_f8f6f4::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "fmtA")
      return prop.fmtA;

    if (name == "fmtB")
      return prop.fmtB;

    if (name == "fmtScaleA")
      return prop.fmtScaleA;

    if (name == "fmtScaleB")
      return prop.fmtScaleB;

    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;

    if (name == "scaleAType")
      return prop.scaleAType;

    if (name == "scaleBType")
      return prop.scaleBType;
  return std::nullopt;
}

void wmma_scale16_f32_16x16x128_f8f6f4::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "fmtA") {
       prop.fmtA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fmtA)>>(value);
       return;
    }

    if (name == "fmtB") {
       prop.fmtB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fmtB)>>(value);
       return;
    }

    if (name == "fmtScaleA") {
       prop.fmtScaleA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fmtScaleA)>>(value);
       return;
    }

    if (name == "fmtScaleB") {
       prop.fmtScaleB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fmtScaleB)>>(value);
       return;
    }

    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }

    if (name == "scaleAType") {
       prop.scaleAType = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleAType)>>(value);
       return;
    }

    if (name == "scaleBType") {
       prop.scaleBType = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleBType)>>(value);
       return;
    }
}

void wmma_scale16_f32_16x16x128_f8f6f4::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.fmtA) attrs.append("fmtA", prop.fmtA);

    if (prop.fmtB) attrs.append("fmtB", prop.fmtB);

    if (prop.fmtScaleA) attrs.append("fmtScaleA", prop.fmtScaleA);

    if (prop.fmtScaleB) attrs.append("fmtScaleB", prop.fmtScaleB);

    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);

    if (prop.scaleAType) attrs.append("scaleAType", prop.scaleAType);

    if (prop.scaleBType) attrs.append("scaleBType", prop.scaleBType);
}

::llvm::LogicalResult wmma_scale16_f32_16x16x128_f8f6f4::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getFmtAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "fmtA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getFmtBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "fmtB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getFmtScaleAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "fmtScaleA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getFmtScaleBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "fmtScaleB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getScaleATypeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleAType", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getScaleBTypeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleBType", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_scale16_f32_16x16x128_f8f6f4::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.fmtA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.fmtB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.fmtScaleA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.fmtScaleB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.scaleAType)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.scaleBType)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_scale16_f32_16x16x128_f8f6f4::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.fmtA);

  writer.writeOptionalAttribute(prop.fmtB);

  writer.writeOptionalAttribute(prop.fmtScaleA);

  writer.writeOptionalAttribute(prop.fmtScaleB);

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);

  writer.writeOptionalAttribute(prop.scaleAType);

  writer.writeOptionalAttribute(prop.scaleBType);
}

uint32_t wmma_scale16_f32_16x16x128_f8f6f4::getFmtA() {
  auto attr = getFmtAAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale16_f32_16x16x128_f8f6f4::getFmtB() {
  auto attr = getFmtBAttr();
  return attr.getValue().getZExtValue();
}

uint16_t wmma_scale16_f32_16x16x128_f8f6f4::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale16_f32_16x16x128_f8f6f4::getScaleAType() {
  auto attr = getScaleATypeAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale16_f32_16x16x128_f8f6f4::getFmtScaleA() {
  auto attr = getFmtScaleAAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale16_f32_16x16x128_f8f6f4::getScaleBType() {
  auto attr = getScaleBTypeAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale16_f32_16x16x128_f8f6f4::getFmtScaleB() {
  auto attr = getFmtScaleBAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_scale16_f32_16x16x128_f8f6f4::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_scale16_f32_16x16x128_f8f6f4::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_scale16_f32_16x16x128_f8f6f4::setFmtA(uint32_t attrValue) {
  getProperties().fmtA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale16_f32_16x16x128_f8f6f4::setFmtB(uint32_t attrValue) {
  getProperties().fmtB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale16_f32_16x16x128_f8f6f4::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_scale16_f32_16x16x128_f8f6f4::setScaleAType(uint32_t attrValue) {
  getProperties().scaleAType = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale16_f32_16x16x128_f8f6f4::setFmtScaleA(uint32_t attrValue) {
  getProperties().fmtScaleA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale16_f32_16x16x128_f8f6f4::setScaleBType(uint32_t attrValue) {
  getProperties().scaleBType = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale16_f32_16x16x128_f8f6f4::setFmtScaleB(uint32_t attrValue) {
  getProperties().fmtScaleB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale16_f32_16x16x128_f8f6f4::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_scale16_f32_16x16x128_f8f6f4::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_scale16_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr fmtA, ::mlir::Value a, ::mlir::IntegerAttr fmtB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  if (fmtA) {
    odsState.getOrAddProperties<Properties>().fmtA = fmtA;
  }
  if (fmtB) {
    odsState.getOrAddProperties<Properties>().fmtB = fmtB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (scaleAType) {
    odsState.getOrAddProperties<Properties>().scaleAType = scaleAType;
  }
  if (fmtScaleA) {
    odsState.getOrAddProperties<Properties>().fmtScaleA = fmtScaleA;
  }
  if (scaleBType) {
    odsState.getOrAddProperties<Properties>().scaleBType = scaleBType;
  }
  if (fmtScaleB) {
    odsState.getOrAddProperties<Properties>().fmtScaleB = fmtScaleB;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_scale16_f32_16x16x128_f8f6f4 wmma_scale16_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr fmtA, ::mlir::Value a, ::mlir::IntegerAttr fmtB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale16_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale16_f32_16x16x128_f8f6f4 wmma_scale16_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr fmtA, ::mlir::Value a, ::mlir::IntegerAttr fmtB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale16_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr fmtA, ::mlir::Value a, ::mlir::IntegerAttr fmtB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  if (fmtA) {
    odsState.getOrAddProperties<Properties>().fmtA = fmtA;
  }
  if (fmtB) {
    odsState.getOrAddProperties<Properties>().fmtB = fmtB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (scaleAType) {
    odsState.getOrAddProperties<Properties>().scaleAType = scaleAType;
  }
  if (fmtScaleA) {
    odsState.getOrAddProperties<Properties>().fmtScaleA = fmtScaleA;
  }
  if (scaleBType) {
    odsState.getOrAddProperties<Properties>().scaleBType = scaleBType;
  }
  if (fmtScaleB) {
    odsState.getOrAddProperties<Properties>().fmtScaleB = fmtScaleB;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_scale16_f32_16x16x128_f8f6f4 wmma_scale16_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr fmtA, ::mlir::Value a, ::mlir::IntegerAttr fmtB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale16_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale16_f32_16x16x128_f8f6f4 wmma_scale16_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr fmtA, ::mlir::Value a, ::mlir::IntegerAttr fmtB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale16_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, uint32_t fmtA, ::mlir::Value a, uint32_t fmtB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  odsState.getOrAddProperties<Properties>().fmtA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtA);
  odsState.getOrAddProperties<Properties>().fmtB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().scaleAType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleAType);
  odsState.getOrAddProperties<Properties>().fmtScaleA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleA);
  odsState.getOrAddProperties<Properties>().scaleBType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleBType);
  odsState.getOrAddProperties<Properties>().fmtScaleB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleB);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_scale16_f32_16x16x128_f8f6f4 wmma_scale16_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, uint32_t fmtA, ::mlir::Value a, uint32_t fmtB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale16_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale16_f32_16x16x128_f8f6f4 wmma_scale16_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, uint32_t fmtA, ::mlir::Value a, uint32_t fmtB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale16_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t fmtA, ::mlir::Value a, uint32_t fmtB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  odsState.getOrAddProperties<Properties>().fmtA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtA);
  odsState.getOrAddProperties<Properties>().fmtB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().scaleAType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleAType);
  odsState.getOrAddProperties<Properties>().fmtScaleA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleA);
  odsState.getOrAddProperties<Properties>().scaleBType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleBType);
  odsState.getOrAddProperties<Properties>().fmtScaleB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleB);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_scale16_f32_16x16x128_f8f6f4 wmma_scale16_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t fmtA, ::mlir::Value a, uint32_t fmtB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale16_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale16_f32_16x16x128_f8f6f4 wmma_scale16_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t fmtA, ::mlir::Value a, uint32_t fmtB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale16_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_scale16_f32_16x16x128_f8f6f4::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_scale16_f32_16x16x128_f8f6f4 wmma_scale16_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_scale16_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale16_f32_16x16x128_f8f6f4 wmma_scale16_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_scale16_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_scale16_f32_16x16x128_f8f6f4 wmma_scale16_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_scale16_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale16_f32_16x16x128_f8f6f4 wmma_scale16_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_scale16_f32_16x16x128_f8f6f4::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.fmtA)
    properties.fmtA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.fmtB)
    properties.fmtB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.scaleAType)
    properties.scaleAType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.fmtScaleA)
    properties.fmtScaleA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.scaleBType)
    properties.scaleBType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.fmtScaleB)
    properties.fmtScaleB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_scale16_f32_16x16x128_f8f6f4::verifyInvariantsImpl() {
  auto tblgen_fmtA = getProperties().fmtA; (void)tblgen_fmtA;
  auto tblgen_fmtB = getProperties().fmtB; (void)tblgen_fmtB;
  auto tblgen_fmtScaleA = getProperties().fmtScaleA; (void)tblgen_fmtScaleA;
  auto tblgen_fmtScaleB = getProperties().fmtScaleB; (void)tblgen_fmtScaleB;
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_scaleAType = getProperties().scaleAType; (void)tblgen_scaleAType;
  auto tblgen_scaleBType = getProperties().scaleBType; (void)tblgen_scaleBType;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_fmtA, "fmtA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_fmtB, "fmtB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleAType, "scaleAType")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_fmtScaleA, "fmtScaleA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleBType, "scaleBType")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_fmtScaleB, "fmtScaleB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps28(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps28(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_scale16_f32_16x16x128_f8f6f4::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_scale16_f32_16x16x128_f8f6f4::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleARawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleAOperands(&scaleARawOperand, 1);  ::llvm::SMLoc scaleAOperandsLoc;
  (void)scaleAOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleBRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleBOperands(&scaleBRawOperand, 1);  ::llvm::SMLoc scaleBOperandsLoc;
  (void)scaleBOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleAOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleARawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleBOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleBRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands, scaleAOperands, scaleBOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_scale16_f32_16x16x128_f8f6f4::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScaleA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScaleB();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getFmtAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("fmtA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getFmtBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("fmtB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getScaleATypeAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("scaleAType");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getFmtScaleAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("fmtScaleA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getScaleBTypeAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("scaleBType");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getFmtScaleBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("fmtScaleB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_scale16_f32_16x16x128_f8f6f4)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_scale16_f32_32x16x128_f4 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::wmma_scale16_f32_32x16x128_f4GenericAdaptorBase(wmma_scale16_f32_32x16x128_f4 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::getScaleATypeAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().scaleAType);
  return attr;
}

uint32_t wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::getScaleAType() {
  auto attr = getScaleATypeAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::getFmtScaleAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().fmtScaleA);
  return attr;
}

uint32_t wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::getFmtScaleA() {
  auto attr = getFmtScaleAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::getScaleBTypeAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().scaleBType);
  return attr;
}

uint32_t wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::getScaleBType() {
  auto attr = getScaleBTypeAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::getFmtScaleBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().fmtScaleB);
  return attr;
}

uint32_t wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::getFmtScaleB() {
  auto attr = getFmtScaleBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_scale16_f32_32x16x128_f4GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_scale16_f32_32x16x128_f4Adaptor::wmma_scale16_f32_32x16x128_f4Adaptor(wmma_scale16_f32_32x16x128_f4 op) : wmma_scale16_f32_32x16x128_f4GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_scale16_f32_32x16x128_f4Adaptor::verify(::mlir::Location loc) {
  auto tblgen_fmtScaleA = getProperties().fmtScaleA; (void)tblgen_fmtScaleA;
  auto tblgen_fmtScaleB = getProperties().fmtScaleB; (void)tblgen_fmtScaleB;
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_scaleAType = getProperties().scaleAType; (void)tblgen_scaleAType;
  auto tblgen_scaleBType = getProperties().scaleBType; (void)tblgen_scaleBType;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.32x16x128.f4' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_scaleAType && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleAType))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleAType).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.32x16x128.f4' op attribute 'scaleAType' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_fmtScaleA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fmtScaleA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fmtScaleA).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.32x16x128.f4' op attribute 'fmtScaleA' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_scaleBType && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleBType))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleBType).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.32x16x128.f4' op attribute 'scaleBType' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_fmtScaleB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fmtScaleB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fmtScaleB).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.32x16x128.f4' op attribute 'fmtScaleB' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.32x16x128.f4' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.scale16.f32.32x16x128.f4' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_scale16_f32_32x16x128_f4::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.fmtScaleA;
       auto attr = dict.get("fmtScaleA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fmtScaleA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.fmtScaleB;
       auto attr = dict.get("fmtScaleB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fmtScaleB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.scaleAType;
       auto attr = dict.get("scaleAType");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleAType` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.scaleBType;
       auto attr = dict.get("scaleBType");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleBType` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_scale16_f32_32x16x128_f4::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.fmtScaleA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fmtScaleA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.fmtScaleB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fmtScaleB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.scaleAType;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleAType",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.scaleBType;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleBType",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_scale16_f32_32x16x128_f4::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.fmtScaleA.getAsOpaquePointer()), 
    llvm::hash_value(prop.fmtScaleB.getAsOpaquePointer()), 
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()), 
    llvm::hash_value(prop.scaleAType.getAsOpaquePointer()), 
    llvm::hash_value(prop.scaleBType.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_scale16_f32_32x16x128_f4::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "fmtScaleA")
      return prop.fmtScaleA;

    if (name == "fmtScaleB")
      return prop.fmtScaleB;

    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;

    if (name == "scaleAType")
      return prop.scaleAType;

    if (name == "scaleBType")
      return prop.scaleBType;
  return std::nullopt;
}

void wmma_scale16_f32_32x16x128_f4::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "fmtScaleA") {
       prop.fmtScaleA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fmtScaleA)>>(value);
       return;
    }

    if (name == "fmtScaleB") {
       prop.fmtScaleB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fmtScaleB)>>(value);
       return;
    }

    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }

    if (name == "scaleAType") {
       prop.scaleAType = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleAType)>>(value);
       return;
    }

    if (name == "scaleBType") {
       prop.scaleBType = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleBType)>>(value);
       return;
    }
}

void wmma_scale16_f32_32x16x128_f4::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.fmtScaleA) attrs.append("fmtScaleA", prop.fmtScaleA);

    if (prop.fmtScaleB) attrs.append("fmtScaleB", prop.fmtScaleB);

    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);

    if (prop.scaleAType) attrs.append("scaleAType", prop.scaleAType);

    if (prop.scaleBType) attrs.append("scaleBType", prop.scaleBType);
}

::llvm::LogicalResult wmma_scale16_f32_32x16x128_f4::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getFmtScaleAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "fmtScaleA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getFmtScaleBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "fmtScaleB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getScaleATypeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleAType", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getScaleBTypeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleBType", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_scale16_f32_32x16x128_f4::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.fmtScaleA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.fmtScaleB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.scaleAType)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.scaleBType)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_scale16_f32_32x16x128_f4::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.fmtScaleA);

  writer.writeOptionalAttribute(prop.fmtScaleB);

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);

  writer.writeOptionalAttribute(prop.scaleAType);

  writer.writeOptionalAttribute(prop.scaleBType);
}

uint16_t wmma_scale16_f32_32x16x128_f4::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale16_f32_32x16x128_f4::getScaleAType() {
  auto attr = getScaleATypeAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale16_f32_32x16x128_f4::getFmtScaleA() {
  auto attr = getFmtScaleAAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale16_f32_32x16x128_f4::getScaleBType() {
  auto attr = getScaleBTypeAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale16_f32_32x16x128_f4::getFmtScaleB() {
  auto attr = getFmtScaleBAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_scale16_f32_32x16x128_f4::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_scale16_f32_32x16x128_f4::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_scale16_f32_32x16x128_f4::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_scale16_f32_32x16x128_f4::setScaleAType(uint32_t attrValue) {
  getProperties().scaleAType = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale16_f32_32x16x128_f4::setFmtScaleA(uint32_t attrValue) {
  getProperties().fmtScaleA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale16_f32_32x16x128_f4::setScaleBType(uint32_t attrValue) {
  getProperties().scaleBType = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale16_f32_32x16x128_f4::setFmtScaleB(uint32_t attrValue) {
  getProperties().fmtScaleB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale16_f32_32x16x128_f4::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_scale16_f32_32x16x128_f4::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_scale16_f32_32x16x128_f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (scaleAType) {
    odsState.getOrAddProperties<Properties>().scaleAType = scaleAType;
  }
  if (fmtScaleA) {
    odsState.getOrAddProperties<Properties>().fmtScaleA = fmtScaleA;
  }
  if (scaleBType) {
    odsState.getOrAddProperties<Properties>().scaleBType = scaleBType;
  }
  if (fmtScaleB) {
    odsState.getOrAddProperties<Properties>().fmtScaleB = fmtScaleB;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_scale16_f32_32x16x128_f4 wmma_scale16_f32_32x16x128_f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale16_f32_32x16x128_f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale16_f32_32x16x128_f4 wmma_scale16_f32_32x16x128_f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale16_f32_32x16x128_f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (scaleAType) {
    odsState.getOrAddProperties<Properties>().scaleAType = scaleAType;
  }
  if (fmtScaleA) {
    odsState.getOrAddProperties<Properties>().fmtScaleA = fmtScaleA;
  }
  if (scaleBType) {
    odsState.getOrAddProperties<Properties>().scaleBType = scaleBType;
  }
  if (fmtScaleB) {
    odsState.getOrAddProperties<Properties>().fmtScaleB = fmtScaleB;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_scale16_f32_32x16x128_f4 wmma_scale16_f32_32x16x128_f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale16_f32_32x16x128_f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale16_f32_32x16x128_f4 wmma_scale16_f32_32x16x128_f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale16_f32_32x16x128_f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().scaleAType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleAType);
  odsState.getOrAddProperties<Properties>().fmtScaleA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleA);
  odsState.getOrAddProperties<Properties>().scaleBType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleBType);
  odsState.getOrAddProperties<Properties>().fmtScaleB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleB);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_scale16_f32_32x16x128_f4 wmma_scale16_f32_32x16x128_f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale16_f32_32x16x128_f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale16_f32_32x16x128_f4 wmma_scale16_f32_32x16x128_f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale16_f32_32x16x128_f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().scaleAType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleAType);
  odsState.getOrAddProperties<Properties>().fmtScaleA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleA);
  odsState.getOrAddProperties<Properties>().scaleBType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleBType);
  odsState.getOrAddProperties<Properties>().fmtScaleB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleB);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_scale16_f32_32x16x128_f4 wmma_scale16_f32_32x16x128_f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale16_f32_32x16x128_f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale16_f32_32x16x128_f4 wmma_scale16_f32_32x16x128_f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale16_f32_32x16x128_f4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_scale16_f32_32x16x128_f4::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_scale16_f32_32x16x128_f4 wmma_scale16_f32_32x16x128_f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_scale16_f32_32x16x128_f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale16_f32_32x16x128_f4 wmma_scale16_f32_32x16x128_f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_scale16_f32_32x16x128_f4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_scale16_f32_32x16x128_f4 wmma_scale16_f32_32x16x128_f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_scale16_f32_32x16x128_f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale16_f32_32x16x128_f4 wmma_scale16_f32_32x16x128_f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_scale16_f32_32x16x128_f4::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.scaleAType)
    properties.scaleAType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.fmtScaleA)
    properties.fmtScaleA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.scaleBType)
    properties.scaleBType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.fmtScaleB)
    properties.fmtScaleB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_scale16_f32_32x16x128_f4::verifyInvariantsImpl() {
  auto tblgen_fmtScaleA = getProperties().fmtScaleA; (void)tblgen_fmtScaleA;
  auto tblgen_fmtScaleB = getProperties().fmtScaleB; (void)tblgen_fmtScaleB;
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_scaleAType = getProperties().scaleAType; (void)tblgen_scaleAType;
  auto tblgen_scaleBType = getProperties().scaleBType; (void)tblgen_scaleBType;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleAType, "scaleAType")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_fmtScaleA, "fmtScaleA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleBType, "scaleBType")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_fmtScaleB, "fmtScaleB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps28(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps28(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_scale16_f32_32x16x128_f4::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_scale16_f32_32x16x128_f4::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleARawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleAOperands(&scaleARawOperand, 1);  ::llvm::SMLoc scaleAOperandsLoc;
  (void)scaleAOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleBRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleBOperands(&scaleBRawOperand, 1);  ::llvm::SMLoc scaleBOperandsLoc;
  (void)scaleBOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleAOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleARawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleBOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleBRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands, scaleAOperands, scaleBOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_scale16_f32_32x16x128_f4::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScaleA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScaleB();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getScaleATypeAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("scaleAType");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getFmtScaleAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("fmtScaleA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getScaleBTypeAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("scaleBType");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getFmtScaleBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("fmtScaleB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_scale16_f32_32x16x128_f4)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_scale_f32_16x16x128_f8f6f4 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase(wmma_scale_f32_16x16x128_f8f6f4 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().fmtA);
  return attr;
}

uint32_t wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtA() {
  auto attr = getFmtAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().fmtB);
  return attr;
}

uint32_t wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtB() {
  auto attr = getFmtBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getScaleATypeAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().scaleAType);
  return attr;
}

uint32_t wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getScaleAType() {
  auto attr = getScaleATypeAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtScaleAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().fmtScaleA);
  return attr;
}

uint32_t wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtScaleA() {
  auto attr = getFmtScaleAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getScaleBTypeAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().scaleBType);
  return attr;
}

uint32_t wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getScaleBType() {
  auto attr = getScaleBTypeAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtScaleBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().fmtScaleB);
  return attr;
}

uint32_t wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getFmtScaleB() {
  auto attr = getFmtScaleBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_scale_f32_16x16x128_f8f6f4GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_scale_f32_16x16x128_f8f6f4Adaptor::wmma_scale_f32_16x16x128_f8f6f4Adaptor(wmma_scale_f32_16x16x128_f8f6f4 op) : wmma_scale_f32_16x16x128_f8f6f4GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_scale_f32_16x16x128_f8f6f4Adaptor::verify(::mlir::Location loc) {
  auto tblgen_fmtA = getProperties().fmtA; (void)tblgen_fmtA;
  auto tblgen_fmtB = getProperties().fmtB; (void)tblgen_fmtB;
  auto tblgen_fmtScaleA = getProperties().fmtScaleA; (void)tblgen_fmtScaleA;
  auto tblgen_fmtScaleB = getProperties().fmtScaleB; (void)tblgen_fmtScaleB;
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_scaleAType = getProperties().scaleAType; (void)tblgen_scaleAType;
  auto tblgen_scaleBType = getProperties().scaleBType; (void)tblgen_scaleBType;

  if (tblgen_fmtA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fmtA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fmtA).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.16x16x128.f8f6f4' op attribute 'fmtA' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_fmtB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fmtB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fmtB).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.16x16x128.f8f6f4' op attribute 'fmtB' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.16x16x128.f8f6f4' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_scaleAType && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleAType))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleAType).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.16x16x128.f8f6f4' op attribute 'scaleAType' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_fmtScaleA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fmtScaleA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fmtScaleA).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.16x16x128.f8f6f4' op attribute 'fmtScaleA' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_scaleBType && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleBType))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleBType).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.16x16x128.f8f6f4' op attribute 'scaleBType' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_fmtScaleB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fmtScaleB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fmtScaleB).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.16x16x128.f8f6f4' op attribute 'fmtScaleB' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.16x16x128.f8f6f4' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.16x16x128.f8f6f4' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_scale_f32_16x16x128_f8f6f4::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.fmtA;
       auto attr = dict.get("fmtA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fmtA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.fmtB;
       auto attr = dict.get("fmtB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fmtB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.fmtScaleA;
       auto attr = dict.get("fmtScaleA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fmtScaleA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.fmtScaleB;
       auto attr = dict.get("fmtScaleB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fmtScaleB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.scaleAType;
       auto attr = dict.get("scaleAType");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleAType` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.scaleBType;
       auto attr = dict.get("scaleBType");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleBType` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_scale_f32_16x16x128_f8f6f4::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.fmtA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fmtA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.fmtB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fmtB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.fmtScaleA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fmtScaleA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.fmtScaleB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fmtScaleB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.scaleAType;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleAType",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.scaleBType;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleBType",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_scale_f32_16x16x128_f8f6f4::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.fmtA.getAsOpaquePointer()), 
    llvm::hash_value(prop.fmtB.getAsOpaquePointer()), 
    llvm::hash_value(prop.fmtScaleA.getAsOpaquePointer()), 
    llvm::hash_value(prop.fmtScaleB.getAsOpaquePointer()), 
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()), 
    llvm::hash_value(prop.scaleAType.getAsOpaquePointer()), 
    llvm::hash_value(prop.scaleBType.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_scale_f32_16x16x128_f8f6f4::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "fmtA")
      return prop.fmtA;

    if (name == "fmtB")
      return prop.fmtB;

    if (name == "fmtScaleA")
      return prop.fmtScaleA;

    if (name == "fmtScaleB")
      return prop.fmtScaleB;

    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;

    if (name == "scaleAType")
      return prop.scaleAType;

    if (name == "scaleBType")
      return prop.scaleBType;
  return std::nullopt;
}

void wmma_scale_f32_16x16x128_f8f6f4::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "fmtA") {
       prop.fmtA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fmtA)>>(value);
       return;
    }

    if (name == "fmtB") {
       prop.fmtB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fmtB)>>(value);
       return;
    }

    if (name == "fmtScaleA") {
       prop.fmtScaleA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fmtScaleA)>>(value);
       return;
    }

    if (name == "fmtScaleB") {
       prop.fmtScaleB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fmtScaleB)>>(value);
       return;
    }

    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }

    if (name == "scaleAType") {
       prop.scaleAType = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleAType)>>(value);
       return;
    }

    if (name == "scaleBType") {
       prop.scaleBType = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleBType)>>(value);
       return;
    }
}

void wmma_scale_f32_16x16x128_f8f6f4::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.fmtA) attrs.append("fmtA", prop.fmtA);

    if (prop.fmtB) attrs.append("fmtB", prop.fmtB);

    if (prop.fmtScaleA) attrs.append("fmtScaleA", prop.fmtScaleA);

    if (prop.fmtScaleB) attrs.append("fmtScaleB", prop.fmtScaleB);

    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);

    if (prop.scaleAType) attrs.append("scaleAType", prop.scaleAType);

    if (prop.scaleBType) attrs.append("scaleBType", prop.scaleBType);
}

::llvm::LogicalResult wmma_scale_f32_16x16x128_f8f6f4::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getFmtAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "fmtA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getFmtBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "fmtB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getFmtScaleAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "fmtScaleA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getFmtScaleBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "fmtScaleB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getScaleATypeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleAType", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getScaleBTypeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleBType", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_scale_f32_16x16x128_f8f6f4::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.fmtA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.fmtB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.fmtScaleA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.fmtScaleB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.scaleAType)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.scaleBType)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_scale_f32_16x16x128_f8f6f4::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.fmtA);

  writer.writeOptionalAttribute(prop.fmtB);

  writer.writeOptionalAttribute(prop.fmtScaleA);

  writer.writeOptionalAttribute(prop.fmtScaleB);

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);

  writer.writeOptionalAttribute(prop.scaleAType);

  writer.writeOptionalAttribute(prop.scaleBType);
}

uint32_t wmma_scale_f32_16x16x128_f8f6f4::getFmtA() {
  auto attr = getFmtAAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale_f32_16x16x128_f8f6f4::getFmtB() {
  auto attr = getFmtBAttr();
  return attr.getValue().getZExtValue();
}

uint16_t wmma_scale_f32_16x16x128_f8f6f4::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale_f32_16x16x128_f8f6f4::getScaleAType() {
  auto attr = getScaleATypeAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale_f32_16x16x128_f8f6f4::getFmtScaleA() {
  auto attr = getFmtScaleAAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale_f32_16x16x128_f8f6f4::getScaleBType() {
  auto attr = getScaleBTypeAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale_f32_16x16x128_f8f6f4::getFmtScaleB() {
  auto attr = getFmtScaleBAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_scale_f32_16x16x128_f8f6f4::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_scale_f32_16x16x128_f8f6f4::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_scale_f32_16x16x128_f8f6f4::setFmtA(uint32_t attrValue) {
  getProperties().fmtA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale_f32_16x16x128_f8f6f4::setFmtB(uint32_t attrValue) {
  getProperties().fmtB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale_f32_16x16x128_f8f6f4::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_scale_f32_16x16x128_f8f6f4::setScaleAType(uint32_t attrValue) {
  getProperties().scaleAType = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale_f32_16x16x128_f8f6f4::setFmtScaleA(uint32_t attrValue) {
  getProperties().fmtScaleA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale_f32_16x16x128_f8f6f4::setScaleBType(uint32_t attrValue) {
  getProperties().scaleBType = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale_f32_16x16x128_f8f6f4::setFmtScaleB(uint32_t attrValue) {
  getProperties().fmtScaleB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale_f32_16x16x128_f8f6f4::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_scale_f32_16x16x128_f8f6f4::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_scale_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr fmtA, ::mlir::Value a, ::mlir::IntegerAttr fmtB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  if (fmtA) {
    odsState.getOrAddProperties<Properties>().fmtA = fmtA;
  }
  if (fmtB) {
    odsState.getOrAddProperties<Properties>().fmtB = fmtB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (scaleAType) {
    odsState.getOrAddProperties<Properties>().scaleAType = scaleAType;
  }
  if (fmtScaleA) {
    odsState.getOrAddProperties<Properties>().fmtScaleA = fmtScaleA;
  }
  if (scaleBType) {
    odsState.getOrAddProperties<Properties>().scaleBType = scaleBType;
  }
  if (fmtScaleB) {
    odsState.getOrAddProperties<Properties>().fmtScaleB = fmtScaleB;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_scale_f32_16x16x128_f8f6f4 wmma_scale_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr fmtA, ::mlir::Value a, ::mlir::IntegerAttr fmtB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale_f32_16x16x128_f8f6f4 wmma_scale_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr fmtA, ::mlir::Value a, ::mlir::IntegerAttr fmtB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr fmtA, ::mlir::Value a, ::mlir::IntegerAttr fmtB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  if (fmtA) {
    odsState.getOrAddProperties<Properties>().fmtA = fmtA;
  }
  if (fmtB) {
    odsState.getOrAddProperties<Properties>().fmtB = fmtB;
  }
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (scaleAType) {
    odsState.getOrAddProperties<Properties>().scaleAType = scaleAType;
  }
  if (fmtScaleA) {
    odsState.getOrAddProperties<Properties>().fmtScaleA = fmtScaleA;
  }
  if (scaleBType) {
    odsState.getOrAddProperties<Properties>().scaleBType = scaleBType;
  }
  if (fmtScaleB) {
    odsState.getOrAddProperties<Properties>().fmtScaleB = fmtScaleB;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_scale_f32_16x16x128_f8f6f4 wmma_scale_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr fmtA, ::mlir::Value a, ::mlir::IntegerAttr fmtB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale_f32_16x16x128_f8f6f4 wmma_scale_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr fmtA, ::mlir::Value a, ::mlir::IntegerAttr fmtB, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, uint32_t fmtA, ::mlir::Value a, uint32_t fmtB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  odsState.getOrAddProperties<Properties>().fmtA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtA);
  odsState.getOrAddProperties<Properties>().fmtB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().scaleAType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleAType);
  odsState.getOrAddProperties<Properties>().fmtScaleA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleA);
  odsState.getOrAddProperties<Properties>().scaleBType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleBType);
  odsState.getOrAddProperties<Properties>().fmtScaleB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleB);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_scale_f32_16x16x128_f8f6f4 wmma_scale_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, uint32_t fmtA, ::mlir::Value a, uint32_t fmtB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale_f32_16x16x128_f8f6f4 wmma_scale_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, uint32_t fmtA, ::mlir::Value a, uint32_t fmtB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t fmtA, ::mlir::Value a, uint32_t fmtB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  odsState.getOrAddProperties<Properties>().fmtA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtA);
  odsState.getOrAddProperties<Properties>().fmtB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().scaleAType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleAType);
  odsState.getOrAddProperties<Properties>().fmtScaleA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleA);
  odsState.getOrAddProperties<Properties>().scaleBType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleBType);
  odsState.getOrAddProperties<Properties>().fmtScaleB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleB);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_scale_f32_16x16x128_f8f6f4 wmma_scale_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t fmtA, ::mlir::Value a, uint32_t fmtB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale_f32_16x16x128_f8f6f4 wmma_scale_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t fmtA, ::mlir::Value a, uint32_t fmtB, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, fmtA, a, fmtB, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_scale_f32_16x16x128_f8f6f4::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_scale_f32_16x16x128_f8f6f4 wmma_scale_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_scale_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale_f32_16x16x128_f8f6f4 wmma_scale_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_scale_f32_16x16x128_f8f6f4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_scale_f32_16x16x128_f8f6f4 wmma_scale_f32_16x16x128_f8f6f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_scale_f32_16x16x128_f8f6f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale_f32_16x16x128_f8f6f4 wmma_scale_f32_16x16x128_f8f6f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_scale_f32_16x16x128_f8f6f4::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.fmtA)
    properties.fmtA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.fmtB)
    properties.fmtB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.scaleAType)
    properties.scaleAType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.fmtScaleA)
    properties.fmtScaleA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.scaleBType)
    properties.scaleBType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.fmtScaleB)
    properties.fmtScaleB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_scale_f32_16x16x128_f8f6f4::verifyInvariantsImpl() {
  auto tblgen_fmtA = getProperties().fmtA; (void)tblgen_fmtA;
  auto tblgen_fmtB = getProperties().fmtB; (void)tblgen_fmtB;
  auto tblgen_fmtScaleA = getProperties().fmtScaleA; (void)tblgen_fmtScaleA;
  auto tblgen_fmtScaleB = getProperties().fmtScaleB; (void)tblgen_fmtScaleB;
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_scaleAType = getProperties().scaleAType; (void)tblgen_scaleAType;
  auto tblgen_scaleBType = getProperties().scaleBType; (void)tblgen_scaleBType;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_fmtA, "fmtA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_fmtB, "fmtB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleAType, "scaleAType")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_fmtScaleA, "fmtScaleA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleBType, "scaleBType")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_fmtScaleB, "fmtScaleB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_scale_f32_16x16x128_f8f6f4::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_scale_f32_16x16x128_f8f6f4::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleARawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleAOperands(&scaleARawOperand, 1);  ::llvm::SMLoc scaleAOperandsLoc;
  (void)scaleAOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleBRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleBOperands(&scaleBRawOperand, 1);  ::llvm::SMLoc scaleBOperandsLoc;
  (void)scaleBOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleAOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleARawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleBOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleBRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands, scaleAOperands, scaleBOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_scale_f32_16x16x128_f8f6f4::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScaleA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScaleB();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getFmtAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("fmtA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getFmtBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("fmtB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getScaleATypeAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("scaleAType");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getFmtScaleAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("fmtScaleA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getScaleBTypeAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("scaleBType");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getFmtScaleBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("fmtScaleB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_scale_f32_16x16x128_f8f6f4)

namespace mlir::ROCDL {


//===----------------------------------------------------------------------===//
// ::mlir::ROCDL::wmma_scale_f32_32x16x128_f4 definitions
//===----------------------------------------------------------------------===//

namespace detail {

wmma_scale_f32_32x16x128_f4GenericAdaptorBase::wmma_scale_f32_32x16x128_f4GenericAdaptorBase(wmma_scale_f32_32x16x128_f4 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr wmma_scale_f32_32x16x128_f4GenericAdaptorBase::getModCAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().modC);
  return attr;
}

uint16_t wmma_scale_f32_32x16x128_f4GenericAdaptorBase::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale_f32_32x16x128_f4GenericAdaptorBase::getScaleATypeAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().scaleAType);
  return attr;
}

uint32_t wmma_scale_f32_32x16x128_f4GenericAdaptorBase::getScaleAType() {
  auto attr = getScaleATypeAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale_f32_32x16x128_f4GenericAdaptorBase::getFmtScaleAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().fmtScaleA);
  return attr;
}

uint32_t wmma_scale_f32_32x16x128_f4GenericAdaptorBase::getFmtScaleA() {
  auto attr = getFmtScaleAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale_f32_32x16x128_f4GenericAdaptorBase::getScaleBTypeAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().scaleBType);
  return attr;
}

uint32_t wmma_scale_f32_32x16x128_f4GenericAdaptorBase::getScaleBType() {
  auto attr = getScaleBTypeAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale_f32_32x16x128_f4GenericAdaptorBase::getFmtScaleBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().fmtScaleB);
  return attr;
}

uint32_t wmma_scale_f32_32x16x128_f4GenericAdaptorBase::getFmtScaleB() {
  auto attr = getFmtScaleBAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale_f32_32x16x128_f4GenericAdaptorBase::getReuseAAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseA);
  return attr;
}

bool wmma_scale_f32_32x16x128_f4GenericAdaptorBase::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

::mlir::IntegerAttr wmma_scale_f32_32x16x128_f4GenericAdaptorBase::getReuseBAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().reuseB);
  return attr;
}

bool wmma_scale_f32_32x16x128_f4GenericAdaptorBase::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
wmma_scale_f32_32x16x128_f4Adaptor::wmma_scale_f32_32x16x128_f4Adaptor(wmma_scale_f32_32x16x128_f4 op) : wmma_scale_f32_32x16x128_f4GenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult wmma_scale_f32_32x16x128_f4Adaptor::verify(::mlir::Location loc) {
  auto tblgen_fmtScaleA = getProperties().fmtScaleA; (void)tblgen_fmtScaleA;
  auto tblgen_fmtScaleB = getProperties().fmtScaleB; (void)tblgen_fmtScaleB;
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_scaleAType = getProperties().scaleAType; (void)tblgen_scaleAType;
  auto tblgen_scaleBType = getProperties().scaleBType; (void)tblgen_scaleBType;

  if (tblgen_modC && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_modC))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_modC).getType().isSignlessInteger(16)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.32x16x128.f4' op attribute 'modC' failed to satisfy constraint: 16-bit signless integer attribute");

  if (tblgen_scaleAType && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleAType))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleAType).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.32x16x128.f4' op attribute 'scaleAType' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_fmtScaleA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fmtScaleA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fmtScaleA).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.32x16x128.f4' op attribute 'fmtScaleA' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_scaleBType && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_scaleBType))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_scaleBType).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.32x16x128.f4' op attribute 'scaleBType' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_fmtScaleB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_fmtScaleB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_fmtScaleB).getType().isSignlessInteger(32)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.32x16x128.f4' op attribute 'fmtScaleB' failed to satisfy constraint: 32-bit signless integer attribute");

  if (tblgen_reuseA && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseA))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseA).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.32x16x128.f4' op attribute 'reuseA' failed to satisfy constraint: 1-bit signless integer attribute");

  if (tblgen_reuseB && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_reuseB))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_reuseB).getType().isSignlessInteger(1)))))
    return emitError(loc, "'rocdl.wmma.scale.f32.32x16x128.f4' op attribute 'reuseB' failed to satisfy constraint: 1-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult wmma_scale_f32_32x16x128_f4::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.fmtScaleA;
       auto attr = dict.get("fmtScaleA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fmtScaleA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.fmtScaleB;
       auto attr = dict.get("fmtScaleB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `fmtScaleB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.modC;
       auto attr = dict.get("modC");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `modC` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseA;
       auto attr = dict.get("reuseA");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseA` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reuseB;
       auto attr = dict.get("reuseB");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reuseB` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.scaleAType;
       auto attr = dict.get("scaleAType");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleAType` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.scaleBType;
       auto attr = dict.get("scaleBType");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `scaleBType` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute wmma_scale_f32_32x16x128_f4::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.fmtScaleA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fmtScaleA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.fmtScaleB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("fmtScaleB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.modC;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("modC",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseA;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseA",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reuseB;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reuseB",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.scaleAType;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleAType",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.scaleBType;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("scaleBType",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code wmma_scale_f32_32x16x128_f4::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.fmtScaleA.getAsOpaquePointer()), 
    llvm::hash_value(prop.fmtScaleB.getAsOpaquePointer()), 
    llvm::hash_value(prop.modC.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseA.getAsOpaquePointer()), 
    llvm::hash_value(prop.reuseB.getAsOpaquePointer()), 
    llvm::hash_value(prop.scaleAType.getAsOpaquePointer()), 
    llvm::hash_value(prop.scaleBType.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> wmma_scale_f32_32x16x128_f4::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "fmtScaleA")
      return prop.fmtScaleA;

    if (name == "fmtScaleB")
      return prop.fmtScaleB;

    if (name == "modC")
      return prop.modC;

    if (name == "reuseA")
      return prop.reuseA;

    if (name == "reuseB")
      return prop.reuseB;

    if (name == "scaleAType")
      return prop.scaleAType;

    if (name == "scaleBType")
      return prop.scaleBType;
  return std::nullopt;
}

void wmma_scale_f32_32x16x128_f4::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "fmtScaleA") {
       prop.fmtScaleA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fmtScaleA)>>(value);
       return;
    }

    if (name == "fmtScaleB") {
       prop.fmtScaleB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fmtScaleB)>>(value);
       return;
    }

    if (name == "modC") {
       prop.modC = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.modC)>>(value);
       return;
    }

    if (name == "reuseA") {
       prop.reuseA = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseA)>>(value);
       return;
    }

    if (name == "reuseB") {
       prop.reuseB = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reuseB)>>(value);
       return;
    }

    if (name == "scaleAType") {
       prop.scaleAType = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleAType)>>(value);
       return;
    }

    if (name == "scaleBType") {
       prop.scaleBType = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.scaleBType)>>(value);
       return;
    }
}

void wmma_scale_f32_32x16x128_f4::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.fmtScaleA) attrs.append("fmtScaleA", prop.fmtScaleA);

    if (prop.fmtScaleB) attrs.append("fmtScaleB", prop.fmtScaleB);

    if (prop.modC) attrs.append("modC", prop.modC);

    if (prop.reuseA) attrs.append("reuseA", prop.reuseA);

    if (prop.reuseB) attrs.append("reuseB", prop.reuseB);

    if (prop.scaleAType) attrs.append("scaleAType", prop.scaleAType);

    if (prop.scaleBType) attrs.append("scaleBType", prop.scaleBType);
}

::llvm::LogicalResult wmma_scale_f32_32x16x128_f4::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getFmtScaleAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "fmtScaleA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getFmtScaleBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "fmtScaleB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getModCAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(attr, "modC", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseAAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseA", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReuseBAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(attr, "reuseB", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getScaleATypeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleAType", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getScaleBTypeAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(attr, "scaleBType", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult wmma_scale_f32_32x16x128_f4::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.fmtScaleA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.fmtScaleB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.modC)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseA)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reuseB)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.scaleAType)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.scaleBType)))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_scale_f32_32x16x128_f4::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.fmtScaleA);

  writer.writeOptionalAttribute(prop.fmtScaleB);

  writer.writeOptionalAttribute(prop.modC);

  writer.writeOptionalAttribute(prop.reuseA);

  writer.writeOptionalAttribute(prop.reuseB);

  writer.writeOptionalAttribute(prop.scaleAType);

  writer.writeOptionalAttribute(prop.scaleBType);
}

uint16_t wmma_scale_f32_32x16x128_f4::getModC() {
  auto attr = getModCAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale_f32_32x16x128_f4::getScaleAType() {
  auto attr = getScaleATypeAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale_f32_32x16x128_f4::getFmtScaleA() {
  auto attr = getFmtScaleAAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale_f32_32x16x128_f4::getScaleBType() {
  auto attr = getScaleBTypeAttr();
  return attr.getValue().getZExtValue();
}

uint32_t wmma_scale_f32_32x16x128_f4::getFmtScaleB() {
  auto attr = getFmtScaleBAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_scale_f32_32x16x128_f4::getReuseA() {
  auto attr = getReuseAAttr();
  return attr.getValue().getZExtValue();
}

bool wmma_scale_f32_32x16x128_f4::getReuseB() {
  auto attr = getReuseBAttr();
  return attr.getValue().getZExtValue();
}

void wmma_scale_f32_32x16x128_f4::setModC(uint16_t attrValue) {
  getProperties().modC = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(16), attrValue);
}

void wmma_scale_f32_32x16x128_f4::setScaleAType(uint32_t attrValue) {
  getProperties().scaleAType = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale_f32_32x16x128_f4::setFmtScaleA(uint32_t attrValue) {
  getProperties().fmtScaleA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale_f32_32x16x128_f4::setScaleBType(uint32_t attrValue) {
  getProperties().scaleBType = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale_f32_32x16x128_f4::setFmtScaleB(uint32_t attrValue) {
  getProperties().fmtScaleB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32), attrValue);
}

void wmma_scale_f32_32x16x128_f4::setReuseA(bool attrValue) {
  getProperties().reuseA = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_scale_f32_32x16x128_f4::setReuseB(bool attrValue) {
  getProperties().reuseB = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(1), attrValue);
}

void wmma_scale_f32_32x16x128_f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (scaleAType) {
    odsState.getOrAddProperties<Properties>().scaleAType = scaleAType;
  }
  if (fmtScaleA) {
    odsState.getOrAddProperties<Properties>().fmtScaleA = fmtScaleA;
  }
  if (scaleBType) {
    odsState.getOrAddProperties<Properties>().scaleBType = scaleBType;
  }
  if (fmtScaleB) {
    odsState.getOrAddProperties<Properties>().fmtScaleB = fmtScaleB;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  odsState.addTypes(res);
}

wmma_scale_f32_32x16x128_f4 wmma_scale_f32_32x16x128_f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale_f32_32x16x128_f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale_f32_32x16x128_f4 wmma_scale_f32_32x16x128_f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale_f32_32x16x128_f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  if (modC) {
    odsState.getOrAddProperties<Properties>().modC = modC;
  }
  if (scaleAType) {
    odsState.getOrAddProperties<Properties>().scaleAType = scaleAType;
  }
  if (fmtScaleA) {
    odsState.getOrAddProperties<Properties>().fmtScaleA = fmtScaleA;
  }
  if (scaleBType) {
    odsState.getOrAddProperties<Properties>().scaleBType = scaleBType;
  }
  if (fmtScaleB) {
    odsState.getOrAddProperties<Properties>().fmtScaleB = fmtScaleB;
  }
  if (reuseA) {
    odsState.getOrAddProperties<Properties>().reuseA = reuseA;
  }
  if (reuseB) {
    odsState.getOrAddProperties<Properties>().reuseB = reuseB;
  }
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_scale_f32_32x16x128_f4 wmma_scale_f32_32x16x128_f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale_f32_32x16x128_f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale_f32_32x16x128_f4 wmma_scale_f32_32x16x128_f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::IntegerAttr modC, ::mlir::Value c, ::mlir::IntegerAttr scaleAType, ::mlir::IntegerAttr fmtScaleA, ::mlir::Value scaleA, ::mlir::IntegerAttr scaleBType, ::mlir::IntegerAttr fmtScaleB, ::mlir::Value scaleB, ::mlir::IntegerAttr reuseA, ::mlir::IntegerAttr reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale_f32_32x16x128_f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().scaleAType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleAType);
  odsState.getOrAddProperties<Properties>().fmtScaleA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleA);
  odsState.getOrAddProperties<Properties>().scaleBType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleBType);
  odsState.getOrAddProperties<Properties>().fmtScaleB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleB);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  odsState.addTypes(res);
}

wmma_scale_f32_32x16x128_f4 wmma_scale_f32_32x16x128_f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, res, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale_f32_32x16x128_f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale_f32_32x16x128_f4 wmma_scale_f32_32x16x128_f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), res, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale_f32_32x16x128_f4::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  odsState.addOperands(a);
  odsState.addOperands(b);
  odsState.addOperands(c);
  odsState.addOperands(scaleA);
  odsState.addOperands(scaleB);
  odsState.getOrAddProperties<Properties>().modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), modC);
  odsState.getOrAddProperties<Properties>().scaleAType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleAType);
  odsState.getOrAddProperties<Properties>().fmtScaleA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleA);
  odsState.getOrAddProperties<Properties>().scaleBType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), scaleBType);
  odsState.getOrAddProperties<Properties>().fmtScaleB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), fmtScaleB);
  odsState.getOrAddProperties<Properties>().reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseA);
  odsState.getOrAddProperties<Properties>().reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), reuseB);
  assert(resultTypes.size() == 1u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

wmma_scale_f32_32x16x128_f4 wmma_scale_f32_32x16x128_f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
  auto __res__ = ::llvm::dyn_cast<wmma_scale_f32_32x16x128_f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale_f32_32x16x128_f4 wmma_scale_f32_32x16x128_f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, uint16_t modC, ::mlir::Value c, uint32_t scaleAType, uint32_t fmtScaleA, ::mlir::Value scaleA, uint32_t scaleBType, uint32_t fmtScaleB, ::mlir::Value scaleB, bool reuseA, bool reuseB) {
  return create(builder, builder.getLoc(), resultTypes, a, b, modC, c, scaleAType, fmtScaleA, scaleA, scaleBType, fmtScaleB, scaleB, reuseA, reuseB);
}

void wmma_scale_f32_32x16x128_f4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    ::mlir::OpaqueProperties properties =
      &odsState.getOrAddProperties<wmma_scale_f32_32x16x128_f4::Properties>();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

wmma_scale_f32_32x16x128_f4 wmma_scale_f32_32x16x128_f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, attributes);
  auto __res__ = ::llvm::dyn_cast<wmma_scale_f32_32x16x128_f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale_f32_32x16x128_f4 wmma_scale_f32_32x16x128_f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, attributes);
}

void wmma_scale_f32_32x16x128_f4::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 5u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 1u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

wmma_scale_f32_32x16x128_f4 wmma_scale_f32_32x16x128_f4::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, resultTypes, operands, properties, discardableAttributes);
  auto __res__ = ::llvm::dyn_cast<wmma_scale_f32_32x16x128_f4>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

wmma_scale_f32_32x16x128_f4 wmma_scale_f32_32x16x128_f4::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), resultTypes, operands, properties, discardableAttributes);
}

void wmma_scale_f32_32x16x128_f4::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.modC)
    properties.modC = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0);
  if (!properties.scaleAType)
    properties.scaleAType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.fmtScaleA)
    properties.fmtScaleA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.scaleBType)
    properties.scaleBType = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.fmtScaleB)
    properties.fmtScaleB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0);
  if (!properties.reuseA)
    properties.reuseA = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
  if (!properties.reuseB)
    properties.reuseB = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0);
}

::llvm::LogicalResult wmma_scale_f32_32x16x128_f4::verifyInvariantsImpl() {
  auto tblgen_fmtScaleA = getProperties().fmtScaleA; (void)tblgen_fmtScaleA;
  auto tblgen_fmtScaleB = getProperties().fmtScaleB; (void)tblgen_fmtScaleB;
  auto tblgen_modC = getProperties().modC; (void)tblgen_modC;
  auto tblgen_reuseA = getProperties().reuseA; (void)tblgen_reuseA;
  auto tblgen_reuseB = getProperties().reuseB; (void)tblgen_reuseB;
  auto tblgen_scaleAType = getProperties().scaleAType; (void)tblgen_scaleAType;
  auto tblgen_scaleBType = getProperties().scaleBType; (void)tblgen_scaleBType;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps2(*this, tblgen_modC, "modC")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleAType, "scaleAType")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_fmtScaleA, "fmtScaleA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_scaleBType, "scaleBType")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps1(*this, tblgen_fmtScaleB, "fmtScaleB")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseA, "reuseA")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_ROCDLOps4(*this, tblgen_reuseB, "reuseB")))
    return ::mlir::failure();
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSOperands(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup1 = getODSOperands(1);

    for (auto v : valueGroup1) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps34(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup2 = getODSOperands(2);

    for (auto v : valueGroup2) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup3 = getODSOperands(3);

    for (auto v : valueGroup3) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
    auto valueGroup4 = getODSOperands(4);

    for (auto v : valueGroup4) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps4(*this, v.getType(), "operand", index++)))
        return ::mlir::failure();
    }
  }
  {
    unsigned index = 0; (void)index;
    auto valueGroup0 = getODSResults(0);

    for (auto v : valueGroup0) {
      if (::mlir::failed(__mlir_ods_local_type_constraint_ROCDLOps36(*this, v.getType(), "result", index++)))
        return ::mlir::failure();
    }
  }
  return ::mlir::success();
}

::llvm::LogicalResult wmma_scale_f32_32x16x128_f4::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult wmma_scale_f32_32x16x128_f4::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::OpAsmParser::UnresolvedOperand aRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> aOperands(&aRawOperand, 1);  ::llvm::SMLoc aOperandsLoc;
  (void)aOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand bRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> bOperands(&bRawOperand, 1);  ::llvm::SMLoc bOperandsLoc;
  (void)bOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand cRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> cOperands(&cRawOperand, 1);  ::llvm::SMLoc cOperandsLoc;
  (void)cOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleARawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleAOperands(&scaleARawOperand, 1);  ::llvm::SMLoc scaleAOperandsLoc;
  (void)scaleAOperandsLoc;
  ::mlir::OpAsmParser::UnresolvedOperand scaleBRawOperand{};
  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> scaleBOperands(&scaleBRawOperand, 1);  ::llvm::SMLoc scaleBOperandsLoc;
  (void)scaleBOperandsLoc;
  ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
  ::llvm::ArrayRef<::mlir::Type> resTypes;

  aOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(aRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  bOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(bRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  cOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(cRawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleAOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleARawOperand))
    return ::mlir::failure();
  if (parser.parseComma())
    return ::mlir::failure();

  scaleBOperandsLoc = parser.getCurrentLocation();
  if (parser.parseOperand(scaleBRawOperand))
    return ::mlir::failure();
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  if (parser.parseColon())
    return ::mlir::failure();

  ::mlir::FunctionType allOperand__res_functionType;
  if (parser.parseType(allOperand__res_functionType))
    return ::mlir::failure();
  allOperandTypes = allOperand__res_functionType.getInputs();
  resTypes = allOperand__res_functionType.getResults();
  result.addTypes(resTypes);
  if (parser.resolveOperands(::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(aOperands, bOperands, cOperands, scaleAOperands, scaleBOperands), allOperandTypes, parser.getNameLoc(), result.operands))
    return ::mlir::failure();
  return ::mlir::success();
}

void wmma_scale_f32_32x16x128_f4::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ';
  _odsPrinter << getA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getB();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getC();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScaleA();
  _odsPrinter << ",";
  _odsPrinter << ' ';
  _odsPrinter << getScaleB();
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getModCAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(16), 0)))
       elidedAttrs.push_back("modC");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getScaleATypeAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("scaleAType");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getFmtScaleAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("fmtScaleA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getScaleBTypeAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("scaleBType");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getFmtScaleBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32), 0)))
       elidedAttrs.push_back("fmtScaleB");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseAAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseA");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReuseBAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(1), 0)))
       elidedAttrs.push_back("reuseB");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
  _odsPrinter << ' ' << ":";
  _odsPrinter << ' ';
  _odsPrinter.printFunctionalType(getOperation()->getOperandTypes(), ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
}


} // namespace mlir::ROCDL
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::ROCDL::wmma_scale_f32_32x16x128_f4)


#endif // GET_OP_CLASSES

