/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |* *| |* AttrDef Definitions *| |* *| |* Automatically generated file, do not edit! *| |* *| \*===----------------------------------------------------------------------===*/ #ifdef GET_ATTRDEF_LIST #undef GET_ATTRDEF_LIST ::mlir::NVVM::FPRoundingModeAttr, ::mlir::NVVM::SaturationModeAttr, ::mlir::NVVM::CacheEvictionPriorityAttr, ::mlir::NVVM::NVVMMemorySpaceAttr, ::mlir::NVVM::MemScopeKindAttr, ::mlir::NVVM::SharedSpaceAttr, ::mlir::NVVM::MemOrderKindAttr, ::mlir::NVVM::ReductionKindAttr, ::mlir::NVVM::BarrierReductionAttr, ::mlir::NVVM::ProxyKindAttr, ::mlir::NVVM::SetMaxRegisterActionAttr, ::mlir::NVVM::ShflKindAttr, ::mlir::NVVM::VoteSyncKindAttr, ::mlir::NVVM::PermuteModeAttr, ::mlir::NVVM::LoadCacheModifierKindAttr, ::mlir::NVVM::MMAB1OpAttr, ::mlir::NVVM::MMAIntOverflowAttr, ::mlir::NVVM::MMAKindAttr, ::mlir::NVVM::MMAShapeAttr, ::mlir::NVVM::MMALayoutAttr, ::mlir::NVVM::MMATypesAttr, ::mlir::NVVM::MMAFragAttr, ::mlir::NVVM::LdStMatrixShapeAttr, ::mlir::NVVM::LdStMatrixEltTypeAttr, ::mlir::NVVM::ScaleVecSizeAttr, ::mlir::NVVM::BlockScaleFormatAttr, ::mlir::NVVM::MMABlockScaleKindAttr, ::mlir::NVVM::TMALoadModeAttr, ::mlir::NVVM::TMAStoreModeAttr, ::mlir::NVVM::CTAGroupKindAttr, ::mlir::NVVM::PrefetchCacheLevelAttr, ::mlir::NVVM::TMAReduxKindAttr, ::mlir::NVVM::WGMMAScaleInAttr, ::mlir::NVVM::WGMMAScaleOutAttr, ::mlir::NVVM::WGMMATypesAttr, ::mlir::NVVM::GridDepActionKindAttr, ::mlir::NVVM::MatchSyncKindAttr, ::mlir::NVVM::Tcgen05FenceKindAttr, ::mlir::NVVM::Tcgen05WaitKindAttr, ::mlir::NVVM::Tcgen05CpShapeAttr, ::mlir::NVVM::Tcgen05CpMulticastAttr, ::mlir::NVVM::Tcgen05CpSrcFormatAttr, ::mlir::NVVM::Tcgen05LdStShapeAttr, ::mlir::NVVM::DotAccumulateTypeAttr, ::mlir::NVVM::ClusterLaunchControlQueryTypeAttr, ::mlir::NVVM::Tcgen05MMAKindAttr, ::mlir::NVVM::Tcgen05MMACollectorOpAttr, ::mlir::NVVM::Tcgen05MMABlockScaleAttr, ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr, ::mlir::NVVM::TensormapFieldAttr, ::mlir::NVVM::TensormapElemtypeAttr, ::mlir::NVVM::TensormapInterleaveLayoutAttr, ::mlir::NVVM::TensormapSwizzleModeAttr, ::mlir::NVVM::TensormapSwizzleAtomicityAttr, ::mlir::NVVM::TensormapFillModeAttr, ::mlir::NVVM::NVVMTargetAttr #endif // GET_ATTRDEF_LIST #ifdef GET_ATTRDEF_CLASSES #undef GET_ATTRDEF_CLASSES static ::mlir::OptionalParseResult generatedAttributeParser(::mlir::AsmParser &parser, ::llvm::StringRef *mnemonic, ::mlir::Type type, ::mlir::Attribute &value) { return ::mlir::AsmParser::KeywordSwitch<::mlir::OptionalParseResult>(parser) .Case(::mlir::NVVM::FPRoundingModeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::FPRoundingModeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::SaturationModeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::SaturationModeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::CacheEvictionPriorityAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::CacheEvictionPriorityAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::NVVMMemorySpaceAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::NVVMMemorySpaceAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::MemScopeKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::MemScopeKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::SharedSpaceAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::SharedSpaceAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::MemOrderKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::MemOrderKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::ReductionKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::ReductionKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::BarrierReductionAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::BarrierReductionAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::ProxyKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::ProxyKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::SetMaxRegisterActionAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::SetMaxRegisterActionAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::ShflKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::ShflKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::VoteSyncKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::VoteSyncKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::PermuteModeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::PermuteModeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::LoadCacheModifierKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::LoadCacheModifierKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::MMAB1OpAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::MMAB1OpAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::MMAIntOverflowAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::MMAIntOverflowAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::MMAKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::MMAKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::MMAShapeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::MMAShapeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::MMALayoutAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::MMALayoutAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::MMATypesAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::MMATypesAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::MMAFragAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::MMAFragAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::LdStMatrixShapeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::LdStMatrixShapeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::LdStMatrixEltTypeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::LdStMatrixEltTypeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::ScaleVecSizeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::ScaleVecSizeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::BlockScaleFormatAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::BlockScaleFormatAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::MMABlockScaleKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::MMABlockScaleKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::TMALoadModeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::TMALoadModeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::TMAStoreModeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::TMAStoreModeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::CTAGroupKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::CTAGroupKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::PrefetchCacheLevelAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::PrefetchCacheLevelAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::TMAReduxKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::TMAReduxKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::WGMMAScaleInAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::WGMMAScaleInAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::WGMMAScaleOutAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::WGMMAScaleOutAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::WGMMATypesAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::WGMMATypesAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::GridDepActionKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::GridDepActionKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::MatchSyncKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::MatchSyncKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::Tcgen05FenceKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::Tcgen05FenceKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::Tcgen05WaitKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::Tcgen05WaitKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::Tcgen05CpShapeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::Tcgen05CpShapeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::Tcgen05CpMulticastAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::Tcgen05CpMulticastAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::Tcgen05CpSrcFormatAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::Tcgen05CpSrcFormatAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::Tcgen05LdStShapeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::Tcgen05LdStShapeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::DotAccumulateTypeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::DotAccumulateTypeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::ClusterLaunchControlQueryTypeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::ClusterLaunchControlQueryTypeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::Tcgen05MMAKindAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::Tcgen05MMAKindAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::Tcgen05MMACollectorOpAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::Tcgen05MMACollectorOpAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::Tcgen05MMABlockScaleAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::Tcgen05MMABlockScaleAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::Tcgen05MMACollectorBBufferAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::TensormapFieldAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::TensormapFieldAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::TensormapElemtypeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::TensormapElemtypeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::TensormapInterleaveLayoutAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::TensormapInterleaveLayoutAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::TensormapSwizzleModeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::TensormapSwizzleModeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::TensormapSwizzleAtomicityAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::TensormapSwizzleAtomicityAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::TensormapFillModeAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::TensormapFillModeAttr::parse(parser, type); return ::mlir::success(!!value); }) .Case(::mlir::NVVM::NVVMTargetAttr::getMnemonic(), [&](llvm::StringRef, llvm::SMLoc) { value = ::mlir::NVVM::NVVMTargetAttr::parse(parser, type); return ::mlir::success(!!value); }) .Default([&](llvm::StringRef keyword, llvm::SMLoc) { *mnemonic = keyword; return std::nullopt; }); } static ::llvm::LogicalResult generatedAttributePrinter(::mlir::Attribute def, ::mlir::AsmPrinter &printer) { return ::llvm::TypeSwitch<::mlir::Attribute, ::llvm::LogicalResult>(def) .Case<::mlir::NVVM::FPRoundingModeAttr>([&](auto t) { printer << ::mlir::NVVM::FPRoundingModeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::SaturationModeAttr>([&](auto t) { printer << ::mlir::NVVM::SaturationModeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::CacheEvictionPriorityAttr>([&](auto t) { printer << ::mlir::NVVM::CacheEvictionPriorityAttr::getMnemonic(); printer << ' '; t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::NVVMMemorySpaceAttr>([&](auto t) { printer << ::mlir::NVVM::NVVMMemorySpaceAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::MemScopeKindAttr>([&](auto t) { printer << ::mlir::NVVM::MemScopeKindAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::SharedSpaceAttr>([&](auto t) { printer << ::mlir::NVVM::SharedSpaceAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::MemOrderKindAttr>([&](auto t) { printer << ::mlir::NVVM::MemOrderKindAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::ReductionKindAttr>([&](auto t) { printer << ::mlir::NVVM::ReductionKindAttr::getMnemonic(); printer << ' '; t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::BarrierReductionAttr>([&](auto t) { printer << ::mlir::NVVM::BarrierReductionAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::ProxyKindAttr>([&](auto t) { printer << ::mlir::NVVM::ProxyKindAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::SetMaxRegisterActionAttr>([&](auto t) { printer << ::mlir::NVVM::SetMaxRegisterActionAttr::getMnemonic(); printer << ' '; t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::ShflKindAttr>([&](auto t) { printer << ::mlir::NVVM::ShflKindAttr::getMnemonic(); printer << ' '; t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::VoteSyncKindAttr>([&](auto t) { printer << ::mlir::NVVM::VoteSyncKindAttr::getMnemonic(); printer << ' '; t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::PermuteModeAttr>([&](auto t) { printer << ::mlir::NVVM::PermuteModeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::LoadCacheModifierKindAttr>([&](auto t) { printer << ::mlir::NVVM::LoadCacheModifierKindAttr::getMnemonic(); printer << ' '; t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::MMAB1OpAttr>([&](auto t) { printer << ::mlir::NVVM::MMAB1OpAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::MMAIntOverflowAttr>([&](auto t) { printer << ::mlir::NVVM::MMAIntOverflowAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::MMAKindAttr>([&](auto t) { printer << ::mlir::NVVM::MMAKindAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::MMAShapeAttr>([&](auto t) { printer << ::mlir::NVVM::MMAShapeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::MMALayoutAttr>([&](auto t) { printer << ::mlir::NVVM::MMALayoutAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::MMATypesAttr>([&](auto t) { printer << ::mlir::NVVM::MMATypesAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::MMAFragAttr>([&](auto t) { printer << ::mlir::NVVM::MMAFragAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::LdStMatrixShapeAttr>([&](auto t) { printer << ::mlir::NVVM::LdStMatrixShapeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::LdStMatrixEltTypeAttr>([&](auto t) { printer << ::mlir::NVVM::LdStMatrixEltTypeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::ScaleVecSizeAttr>([&](auto t) { printer << ::mlir::NVVM::ScaleVecSizeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::BlockScaleFormatAttr>([&](auto t) { printer << ::mlir::NVVM::BlockScaleFormatAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::MMABlockScaleKindAttr>([&](auto t) { printer << ::mlir::NVVM::MMABlockScaleKindAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::TMALoadModeAttr>([&](auto t) { printer << ::mlir::NVVM::TMALoadModeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::TMAStoreModeAttr>([&](auto t) { printer << ::mlir::NVVM::TMAStoreModeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::CTAGroupKindAttr>([&](auto t) { printer << ::mlir::NVVM::CTAGroupKindAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::PrefetchCacheLevelAttr>([&](auto t) { printer << ::mlir::NVVM::PrefetchCacheLevelAttr::getMnemonic(); printer << ' '; t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::TMAReduxKindAttr>([&](auto t) { printer << ::mlir::NVVM::TMAReduxKindAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::WGMMAScaleInAttr>([&](auto t) { printer << ::mlir::NVVM::WGMMAScaleInAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::WGMMAScaleOutAttr>([&](auto t) { printer << ::mlir::NVVM::WGMMAScaleOutAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::WGMMATypesAttr>([&](auto t) { printer << ::mlir::NVVM::WGMMATypesAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::GridDepActionKindAttr>([&](auto t) { printer << ::mlir::NVVM::GridDepActionKindAttr::getMnemonic(); printer << ' '; t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::MatchSyncKindAttr>([&](auto t) { printer << ::mlir::NVVM::MatchSyncKindAttr::getMnemonic(); printer << ' '; t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::Tcgen05FenceKindAttr>([&](auto t) { printer << ::mlir::NVVM::Tcgen05FenceKindAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::Tcgen05WaitKindAttr>([&](auto t) { printer << ::mlir::NVVM::Tcgen05WaitKindAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::Tcgen05CpShapeAttr>([&](auto t) { printer << ::mlir::NVVM::Tcgen05CpShapeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::Tcgen05CpMulticastAttr>([&](auto t) { printer << ::mlir::NVVM::Tcgen05CpMulticastAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::Tcgen05CpSrcFormatAttr>([&](auto t) { printer << ::mlir::NVVM::Tcgen05CpSrcFormatAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::Tcgen05LdStShapeAttr>([&](auto t) { printer << ::mlir::NVVM::Tcgen05LdStShapeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::DotAccumulateTypeAttr>([&](auto t) { printer << ::mlir::NVVM::DotAccumulateTypeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::ClusterLaunchControlQueryTypeAttr>([&](auto t) { printer << ::mlir::NVVM::ClusterLaunchControlQueryTypeAttr::getMnemonic(); printer << ' '; t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::Tcgen05MMAKindAttr>([&](auto t) { printer << ::mlir::NVVM::Tcgen05MMAKindAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::Tcgen05MMACollectorOpAttr>([&](auto t) { printer << ::mlir::NVVM::Tcgen05MMACollectorOpAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::Tcgen05MMABlockScaleAttr>([&](auto t) { printer << ::mlir::NVVM::Tcgen05MMABlockScaleAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::Tcgen05MMACollectorBBufferAttr>([&](auto t) { printer << ::mlir::NVVM::Tcgen05MMACollectorBBufferAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::TensormapFieldAttr>([&](auto t) { printer << ::mlir::NVVM::TensormapFieldAttr::getMnemonic(); printer << ' '; t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::TensormapElemtypeAttr>([&](auto t) { printer << ::mlir::NVVM::TensormapElemtypeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::TensormapInterleaveLayoutAttr>([&](auto t) { printer << ::mlir::NVVM::TensormapInterleaveLayoutAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::TensormapSwizzleModeAttr>([&](auto t) { printer << ::mlir::NVVM::TensormapSwizzleModeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::TensormapSwizzleAtomicityAttr>([&](auto t) { printer << ::mlir::NVVM::TensormapSwizzleAtomicityAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::TensormapFillModeAttr>([&](auto t) { printer << ::mlir::NVVM::TensormapFillModeAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Case<::mlir::NVVM::NVVMTargetAttr>([&](auto t) { printer << ::mlir::NVVM::NVVMTargetAttr::getMnemonic(); t.print(printer); return ::mlir::success(); }) .Default([](auto) { return ::mlir::failure(); }); } namespace mlir::NVVM { namespace detail { struct FPRoundingModeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::FPRoundingMode>; FPRoundingModeAttrStorage(::mlir::NVVM::FPRoundingMode value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static FPRoundingModeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) FPRoundingModeAttrStorage(std::move(value)); } ::mlir::NVVM::FPRoundingMode value; }; } // namespace detail FPRoundingModeAttr FPRoundingModeAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::FPRoundingMode value) { return Base::get(context, std::move(value)); } ::mlir::Attribute FPRoundingModeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::FPRoundingMode> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::FPRoundingMode> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeFPRoundingMode(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::FPRoundingMode" << " to be one of: " << "none" << ", " << "rn" << ", " << "rm" << ", " << "rp" << ", " << "rz" << ", " << "rna" << ", " << "rs")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse FPRoundingModeAttr parameter 'value' which is to be a `::mlir::NVVM::FPRoundingMode`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return FPRoundingModeAttr::get(odsParser.getContext(), ::mlir::NVVM::FPRoundingMode((*_result_value))); } void FPRoundingModeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyFPRoundingMode(getValue()); odsPrinter << ">"; } ::mlir::NVVM::FPRoundingMode FPRoundingModeAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::FPRoundingModeAttr) namespace mlir::NVVM { namespace detail { struct SaturationModeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::SaturationMode>; SaturationModeAttrStorage(::mlir::NVVM::SaturationMode value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static SaturationModeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) SaturationModeAttrStorage(std::move(value)); } ::mlir::NVVM::SaturationMode value; }; } // namespace detail SaturationModeAttr SaturationModeAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::SaturationMode value) { return Base::get(context, std::move(value)); } ::mlir::Attribute SaturationModeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::SaturationMode> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::SaturationMode> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeSaturationMode(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::SaturationMode" << " to be one of: " << "none" << ", " << "satfinite" << ", " << "sat")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse SaturationModeAttr parameter 'value' which is to be a `::mlir::NVVM::SaturationMode`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return SaturationModeAttr::get(odsParser.getContext(), ::mlir::NVVM::SaturationMode((*_result_value))); } void SaturationModeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifySaturationMode(getValue()); odsPrinter << ">"; } ::mlir::NVVM::SaturationMode SaturationModeAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::SaturationModeAttr) namespace mlir::NVVM { namespace detail { struct CacheEvictionPriorityAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::CacheEvictionPriority>; CacheEvictionPriorityAttrStorage(::mlir::NVVM::CacheEvictionPriority value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static CacheEvictionPriorityAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) CacheEvictionPriorityAttrStorage(std::move(value)); } ::mlir::NVVM::CacheEvictionPriority value; }; } // namespace detail CacheEvictionPriorityAttr CacheEvictionPriorityAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::CacheEvictionPriority value) { return Base::get(context, std::move(value)); } ::mlir::Attribute CacheEvictionPriorityAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::CacheEvictionPriority> _result_value; // Parse variable 'value' _result_value = ::mlir::FieldParser<::mlir::NVVM::CacheEvictionPriority>::parse(odsParser); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse CacheEvictionPriorityAttr parameter 'value' which is to be a `::mlir::NVVM::CacheEvictionPriority`"); return {}; } assert(::mlir::succeeded(_result_value)); return CacheEvictionPriorityAttr::get(odsParser.getContext(), ::mlir::NVVM::CacheEvictionPriority((*_result_value))); } void CacheEvictionPriorityAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter.printStrippedAttrOrType(getValue()); } ::mlir::NVVM::CacheEvictionPriority CacheEvictionPriorityAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::CacheEvictionPriorityAttr) namespace mlir::NVVM { namespace detail { struct NVVMMemorySpaceAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::NVVMMemorySpace>; NVVMMemorySpaceAttrStorage(::mlir::NVVM::NVVMMemorySpace value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static NVVMMemorySpaceAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) NVVMMemorySpaceAttrStorage(std::move(value)); } ::mlir::NVVM::NVVMMemorySpace value; }; } // namespace detail NVVMMemorySpaceAttr NVVMMemorySpaceAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::NVVMMemorySpace value) { return Base::get(context, std::move(value)); } ::mlir::Attribute NVVMMemorySpaceAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::NVVMMemorySpace> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = ::mlir::FieldParser<::mlir::NVVM::NVVMMemorySpace>::parse(odsParser); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse NVVMMemorySpaceAttr parameter 'value' which is to be a `::mlir::NVVM::NVVMMemorySpace`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return NVVMMemorySpaceAttr::get(odsParser.getContext(), ::mlir::NVVM::NVVMMemorySpace((*_result_value))); } void NVVMMemorySpaceAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter.printStrippedAttrOrType(getValue()); odsPrinter << ">"; } ::mlir::NVVM::NVVMMemorySpace NVVMMemorySpaceAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::NVVMMemorySpaceAttr) namespace mlir::NVVM { namespace detail { struct MemScopeKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::MemScopeKind>; MemScopeKindAttrStorage(::mlir::NVVM::MemScopeKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static MemScopeKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) MemScopeKindAttrStorage(std::move(value)); } ::mlir::NVVM::MemScopeKind value; }; } // namespace detail MemScopeKindAttr MemScopeKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::MemScopeKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute MemScopeKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::MemScopeKind> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::MemScopeKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeMemScopeKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::MemScopeKind" << " to be one of: " << "cta" << ", " << "cluster" << ", " << "gpu" << ", " << "sys")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse MemScopeKindAttr parameter 'value' which is to be a `::mlir::NVVM::MemScopeKind`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return MemScopeKindAttr::get(odsParser.getContext(), ::mlir::NVVM::MemScopeKind((*_result_value))); } void MemScopeKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyMemScopeKind(getValue()); odsPrinter << ">"; } ::mlir::NVVM::MemScopeKind MemScopeKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::MemScopeKindAttr) namespace mlir::NVVM { namespace detail { struct SharedSpaceAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::SharedSpace>; SharedSpaceAttrStorage(::mlir::NVVM::SharedSpace value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static SharedSpaceAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) SharedSpaceAttrStorage(std::move(value)); } ::mlir::NVVM::SharedSpace value; }; } // namespace detail SharedSpaceAttr SharedSpaceAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::SharedSpace value) { return Base::get(context, std::move(value)); } ::mlir::Attribute SharedSpaceAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::SharedSpace> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::SharedSpace> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeSharedSpace(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::SharedSpace" << " to be one of: " << "cta" << ", " << "cluster")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse SharedSpaceAttr parameter 'value' which is to be a `::mlir::NVVM::SharedSpace`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return SharedSpaceAttr::get(odsParser.getContext(), ::mlir::NVVM::SharedSpace((*_result_value))); } void SharedSpaceAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifySharedSpace(getValue()); odsPrinter << ">"; } ::mlir::NVVM::SharedSpace SharedSpaceAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::SharedSpaceAttr) namespace mlir::NVVM { namespace detail { struct MemOrderKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::MemOrderKind>; MemOrderKindAttrStorage(::mlir::NVVM::MemOrderKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static MemOrderKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) MemOrderKindAttrStorage(std::move(value)); } ::mlir::NVVM::MemOrderKind value; }; } // namespace detail MemOrderKindAttr MemOrderKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::MemOrderKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute MemOrderKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::MemOrderKind> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::MemOrderKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeMemOrderKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::MemOrderKind" << " to be one of: " << "weak" << ", " << "relaxed" << ", " << "acquire" << ", " << "release" << ", " << "acq_rel" << ", " << "sc" << ", " << "mmio" << ", " << "volatile")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse MemOrderKindAttr parameter 'value' which is to be a `::mlir::NVVM::MemOrderKind`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return MemOrderKindAttr::get(odsParser.getContext(), ::mlir::NVVM::MemOrderKind((*_result_value))); } void MemOrderKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyMemOrderKind(getValue()); odsPrinter << ">"; } ::mlir::NVVM::MemOrderKind MemOrderKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::MemOrderKindAttr) namespace mlir::NVVM { namespace detail { struct ReductionKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::ReductionKind>; ReductionKindAttrStorage(::mlir::NVVM::ReductionKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static ReductionKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) ReductionKindAttrStorage(std::move(value)); } ::mlir::NVVM::ReductionKind value; }; } // namespace detail ReductionKindAttr ReductionKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::ReductionKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute ReductionKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::ReductionKind> _result_value; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::ReductionKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeReductionKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::ReductionKind" << " to be one of: " << "add" << ", " << "and" << ", " << "max" << ", " << "min" << ", " << "or" << ", " << "umax" << ", " << "umin" << ", " << "xor" << ", " << "fmin" << ", " << "fmax")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse ReductionKindAttr parameter 'value' which is to be a `::mlir::NVVM::ReductionKind`"); return {}; } assert(::mlir::succeeded(_result_value)); return ReductionKindAttr::get(odsParser.getContext(), ::mlir::NVVM::ReductionKind((*_result_value))); } void ReductionKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << stringifyReductionKind(getValue()); } ::mlir::NVVM::ReductionKind ReductionKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::ReductionKindAttr) namespace mlir::NVVM { namespace detail { struct BarrierReductionAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::BarrierReduction>; BarrierReductionAttrStorage(::mlir::NVVM::BarrierReduction value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static BarrierReductionAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) BarrierReductionAttrStorage(std::move(value)); } ::mlir::NVVM::BarrierReduction value; }; } // namespace detail BarrierReductionAttr BarrierReductionAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::BarrierReduction value) { return Base::get(context, std::move(value)); } ::mlir::Attribute BarrierReductionAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::BarrierReduction> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::BarrierReduction> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeBarrierReduction(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::BarrierReduction" << " to be one of: " << "popc" << ", " << "and" << ", " << "or")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse BarrierReductionAttr parameter 'value' which is to be a `::mlir::NVVM::BarrierReduction`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return BarrierReductionAttr::get(odsParser.getContext(), ::mlir::NVVM::BarrierReduction((*_result_value))); } void BarrierReductionAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyBarrierReduction(getValue()); odsPrinter << ">"; } ::mlir::NVVM::BarrierReduction BarrierReductionAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::BarrierReductionAttr) namespace mlir::NVVM { namespace detail { struct ProxyKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::ProxyKind>; ProxyKindAttrStorage(::mlir::NVVM::ProxyKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static ProxyKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) ProxyKindAttrStorage(std::move(value)); } ::mlir::NVVM::ProxyKind value; }; } // namespace detail ProxyKindAttr ProxyKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::ProxyKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute ProxyKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::ProxyKind> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::ProxyKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeProxyKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::ProxyKind" << " to be one of: " << "alias" << ", " << "async" << ", " << "async.global" << ", " << "async.shared" << ", " << "tensormap" << ", " << "generic")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse ProxyKindAttr parameter 'value' which is to be a `::mlir::NVVM::ProxyKind`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return ProxyKindAttr::get(odsParser.getContext(), ::mlir::NVVM::ProxyKind((*_result_value))); } void ProxyKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyProxyKind(getValue()); odsPrinter << ">"; } ::mlir::NVVM::ProxyKind ProxyKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::ProxyKindAttr) namespace mlir::NVVM { namespace detail { struct SetMaxRegisterActionAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::SetMaxRegisterAction>; SetMaxRegisterActionAttrStorage(::mlir::NVVM::SetMaxRegisterAction value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static SetMaxRegisterActionAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) SetMaxRegisterActionAttrStorage(std::move(value)); } ::mlir::NVVM::SetMaxRegisterAction value; }; } // namespace detail SetMaxRegisterActionAttr SetMaxRegisterActionAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::SetMaxRegisterAction value) { return Base::get(context, std::move(value)); } ::mlir::Attribute SetMaxRegisterActionAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::SetMaxRegisterAction> _result_value; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::SetMaxRegisterAction> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeSetMaxRegisterAction(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::SetMaxRegisterAction" << " to be one of: " << "decrease" << ", " << "increase")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse SetMaxRegisterActionAttr parameter 'value' which is to be a `::mlir::NVVM::SetMaxRegisterAction`"); return {}; } assert(::mlir::succeeded(_result_value)); return SetMaxRegisterActionAttr::get(odsParser.getContext(), ::mlir::NVVM::SetMaxRegisterAction((*_result_value))); } void SetMaxRegisterActionAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << stringifySetMaxRegisterAction(getValue()); } ::mlir::NVVM::SetMaxRegisterAction SetMaxRegisterActionAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::SetMaxRegisterActionAttr) namespace mlir::NVVM { namespace detail { struct ShflKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::ShflKind>; ShflKindAttrStorage(::mlir::NVVM::ShflKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static ShflKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) ShflKindAttrStorage(std::move(value)); } ::mlir::NVVM::ShflKind value; }; } // namespace detail ShflKindAttr ShflKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::ShflKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute ShflKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::ShflKind> _result_value; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::ShflKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeShflKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::ShflKind" << " to be one of: " << "bfly" << ", " << "up" << ", " << "down" << ", " << "idx")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse ShflKindAttr parameter 'value' which is to be a `::mlir::NVVM::ShflKind`"); return {}; } assert(::mlir::succeeded(_result_value)); return ShflKindAttr::get(odsParser.getContext(), ::mlir::NVVM::ShflKind((*_result_value))); } void ShflKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << stringifyShflKind(getValue()); } ::mlir::NVVM::ShflKind ShflKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::ShflKindAttr) namespace mlir::NVVM { namespace detail { struct VoteSyncKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::VoteSyncKind>; VoteSyncKindAttrStorage(::mlir::NVVM::VoteSyncKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static VoteSyncKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) VoteSyncKindAttrStorage(std::move(value)); } ::mlir::NVVM::VoteSyncKind value; }; } // namespace detail VoteSyncKindAttr VoteSyncKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::VoteSyncKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute VoteSyncKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::VoteSyncKind> _result_value; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::VoteSyncKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeVoteSyncKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::VoteSyncKind" << " to be one of: " << "any" << ", " << "all" << ", " << "ballot" << ", " << "uni")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse VoteSyncKindAttr parameter 'value' which is to be a `::mlir::NVVM::VoteSyncKind`"); return {}; } assert(::mlir::succeeded(_result_value)); return VoteSyncKindAttr::get(odsParser.getContext(), ::mlir::NVVM::VoteSyncKind((*_result_value))); } void VoteSyncKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << stringifyVoteSyncKind(getValue()); } ::mlir::NVVM::VoteSyncKind VoteSyncKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::VoteSyncKindAttr) namespace mlir::NVVM { namespace detail { struct PermuteModeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::PermuteMode>; PermuteModeAttrStorage(::mlir::NVVM::PermuteMode value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static PermuteModeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) PermuteModeAttrStorage(std::move(value)); } ::mlir::NVVM::PermuteMode value; }; } // namespace detail PermuteModeAttr PermuteModeAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::PermuteMode value) { return Base::get(context, std::move(value)); } ::mlir::Attribute PermuteModeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::PermuteMode> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::PermuteMode> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizePermuteMode(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::PermuteMode" << " to be one of: " << "default" << ", " << "f4e" << ", " << "b4e" << ", " << "rc8" << ", " << "ecl" << ", " << "ecr" << ", " << "rc16")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse PermuteModeAttr parameter 'value' which is to be a `::mlir::NVVM::PermuteMode`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return PermuteModeAttr::get(odsParser.getContext(), ::mlir::NVVM::PermuteMode((*_result_value))); } void PermuteModeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyPermuteMode(getValue()); odsPrinter << ">"; } ::mlir::NVVM::PermuteMode PermuteModeAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::PermuteModeAttr) namespace mlir::NVVM { namespace detail { struct LoadCacheModifierKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::LoadCacheModifierKind>; LoadCacheModifierKindAttrStorage(::mlir::NVVM::LoadCacheModifierKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static LoadCacheModifierKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) LoadCacheModifierKindAttrStorage(std::move(value)); } ::mlir::NVVM::LoadCacheModifierKind value; }; } // namespace detail LoadCacheModifierKindAttr LoadCacheModifierKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::LoadCacheModifierKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute LoadCacheModifierKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::LoadCacheModifierKind> _result_value; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::LoadCacheModifierKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeLoadCacheModifierKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::LoadCacheModifierKind" << " to be one of: " << "ca" << ", " << "cg" << ", " << "cs" << ", " << "lu" << ", " << "cv")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse LoadCacheModifierAttr parameter 'value' which is to be a `::mlir::NVVM::LoadCacheModifierKind`"); return {}; } assert(::mlir::succeeded(_result_value)); return LoadCacheModifierKindAttr::get(odsParser.getContext(), ::mlir::NVVM::LoadCacheModifierKind((*_result_value))); } void LoadCacheModifierKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << stringifyLoadCacheModifierKind(getValue()); } ::mlir::NVVM::LoadCacheModifierKind LoadCacheModifierKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::LoadCacheModifierKindAttr) namespace mlir::NVVM { namespace detail { struct MMAB1OpAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::MMAB1Op>; MMAB1OpAttrStorage(::mlir::NVVM::MMAB1Op value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static MMAB1OpAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) MMAB1OpAttrStorage(std::move(value)); } ::mlir::NVVM::MMAB1Op value; }; } // namespace detail MMAB1OpAttr MMAB1OpAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::MMAB1Op value) { return Base::get(context, std::move(value)); } ::mlir::Attribute MMAB1OpAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::MMAB1Op> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::MMAB1Op> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeMMAB1Op(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::MMAB1Op" << " to be one of: " << "none" << ", " << "xor_popc" << ", " << "and_popc")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse MMAB1OpAttr parameter 'value' which is to be a `::mlir::NVVM::MMAB1Op`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return MMAB1OpAttr::get(odsParser.getContext(), ::mlir::NVVM::MMAB1Op((*_result_value))); } void MMAB1OpAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyMMAB1Op(getValue()); odsPrinter << ">"; } ::mlir::NVVM::MMAB1Op MMAB1OpAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::MMAB1OpAttr) namespace mlir::NVVM { namespace detail { struct MMAIntOverflowAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::MMAIntOverflow>; MMAIntOverflowAttrStorage(::mlir::NVVM::MMAIntOverflow value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static MMAIntOverflowAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) MMAIntOverflowAttrStorage(std::move(value)); } ::mlir::NVVM::MMAIntOverflow value; }; } // namespace detail MMAIntOverflowAttr MMAIntOverflowAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::MMAIntOverflow value) { return Base::get(context, std::move(value)); } ::mlir::Attribute MMAIntOverflowAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::MMAIntOverflow> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::MMAIntOverflow> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeMMAIntOverflow(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::MMAIntOverflow" << " to be one of: " << "satfinite" << ", " << "wrapped")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse MMAIntOverflowAttr parameter 'value' which is to be a `::mlir::NVVM::MMAIntOverflow`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return MMAIntOverflowAttr::get(odsParser.getContext(), ::mlir::NVVM::MMAIntOverflow((*_result_value))); } void MMAIntOverflowAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyMMAIntOverflow(getValue()); odsPrinter << ">"; } ::mlir::NVVM::MMAIntOverflow MMAIntOverflowAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::MMAIntOverflowAttr) namespace mlir::NVVM { namespace detail { struct MMAKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::MMAKind>; MMAKindAttrStorage(::mlir::NVVM::MMAKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static MMAKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) MMAKindAttrStorage(std::move(value)); } ::mlir::NVVM::MMAKind value; }; } // namespace detail MMAKindAttr MMAKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::MMAKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute MMAKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::MMAKind> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::MMAKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeMMAKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::MMAKind" << " to be one of: " << "f8f6f4")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse MMAKindAttr parameter 'value' which is to be a `::mlir::NVVM::MMAKind`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return MMAKindAttr::get(odsParser.getContext(), ::mlir::NVVM::MMAKind((*_result_value))); } void MMAKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyMMAKind(getValue()); odsPrinter << ">"; } ::mlir::NVVM::MMAKind MMAKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::MMAKindAttr) namespace mlir::NVVM { namespace detail { struct MMAShapeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple; MMAShapeAttrStorage(int m, int n, int k) : m(std::move(m)), n(std::move(n)), k(std::move(k)) {} KeyTy getAsKey() const { return KeyTy(m, n, k); } bool operator==(const KeyTy &tblgenKey) const { return (m == std::get<0>(tblgenKey)) && (n == std::get<1>(tblgenKey)) && (k == std::get<2>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey), std::get<1>(tblgenKey), std::get<2>(tblgenKey)); } static MMAShapeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto m = std::move(std::get<0>(tblgenKey)); auto n = std::move(std::get<1>(tblgenKey)); auto k = std::move(std::get<2>(tblgenKey)); return new (allocator.allocate()) MMAShapeAttrStorage(std::move(m), std::move(n), std::move(k)); } int m; int n; int k; }; } // namespace detail MMAShapeAttr MMAShapeAttr::get(::mlir::MLIRContext *context, int m, int n, int k) { return Base::get(context, std::move(m), std::move(n), std::move(k)); } ::mlir::Attribute MMAShapeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr _result_m; ::mlir::FailureOr _result_n; ::mlir::FailureOr _result_k; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse parameter struct bool _seen_m = false; bool _seen_n = false; bool _seen_k = false; { const auto _loop_body = [&](::llvm::StringRef _paramKey) -> bool { // Parse literal '=' if (odsParser.parseEqual()) return {}; if (!_seen_m && _paramKey == "m") { _seen_m = true; // Parse variable 'm' _result_m = ::mlir::FieldParser::parse(odsParser); if (::mlir::failed(_result_m)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse NVVM_MMAShapeAttr parameter 'm' which is to be a `int`"); return {}; } } else if (!_seen_n && _paramKey == "n") { _seen_n = true; // Parse variable 'n' _result_n = ::mlir::FieldParser::parse(odsParser); if (::mlir::failed(_result_n)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse NVVM_MMAShapeAttr parameter 'n' which is to be a `int`"); return {}; } } else if (!_seen_k && _paramKey == "k") { _seen_k = true; // Parse variable 'k' _result_k = ::mlir::FieldParser::parse(odsParser); if (::mlir::failed(_result_k)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse NVVM_MMAShapeAttr parameter 'k' which is to be a `int`"); return {}; } } else { odsParser.emitError(odsParser.getCurrentLocation(), "duplicate or unknown struct parameter name: ") << _paramKey; return {}; } return true; }; for (unsigned odsStructIndex = 0; odsStructIndex < 3; ++odsStructIndex) { ::llvm::StringRef _paramKey; if (odsParser.parseKeyword(&_paramKey)) { odsParser.emitError(odsParser.getCurrentLocation(), "expected a parameter name in struct"); return {}; } if (!_loop_body(_paramKey)) return {}; if ((odsStructIndex != 3 - 1) && odsParser.parseComma()) return {}; } } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_m)); assert(::mlir::succeeded(_result_n)); assert(::mlir::succeeded(_result_k)); return MMAShapeAttr::get(odsParser.getContext(), int((*_result_m)), int((*_result_n)), int((*_result_k))); } void MMAShapeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; { bool _firstPrinted = true; if (!_firstPrinted) odsPrinter << ", "; _firstPrinted = false; odsPrinter << "m = "; odsPrinter.printStrippedAttrOrType(getM()); if (!_firstPrinted) odsPrinter << ", "; _firstPrinted = false; odsPrinter << "n = "; odsPrinter.printStrippedAttrOrType(getN()); if (!_firstPrinted) odsPrinter << ", "; _firstPrinted = false; odsPrinter << "k = "; odsPrinter.printStrippedAttrOrType(getK()); } odsPrinter << ">"; } int MMAShapeAttr::getM() const { return getImpl()->m; } int MMAShapeAttr::getN() const { return getImpl()->n; } int MMAShapeAttr::getK() const { return getImpl()->k; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::MMAShapeAttr) namespace mlir::NVVM { namespace detail { struct MMALayoutAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::MMALayout>; MMALayoutAttrStorage(::mlir::NVVM::MMALayout value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static MMALayoutAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) MMALayoutAttrStorage(std::move(value)); } ::mlir::NVVM::MMALayout value; }; } // namespace detail MMALayoutAttr MMALayoutAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::MMALayout value) { return Base::get(context, std::move(value)); } ::mlir::Attribute MMALayoutAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::MMALayout> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::MMALayout> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeMMALayout(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::MMALayout" << " to be one of: " << "row" << ", " << "col")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse MMALayoutAttr parameter 'value' which is to be a `::mlir::NVVM::MMALayout`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return MMALayoutAttr::get(odsParser.getContext(), ::mlir::NVVM::MMALayout((*_result_value))); } void MMALayoutAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyMMALayout(getValue()); odsPrinter << ">"; } ::mlir::NVVM::MMALayout MMALayoutAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::MMALayoutAttr) namespace mlir::NVVM { namespace detail { struct MMATypesAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::MMATypes>; MMATypesAttrStorage(::mlir::NVVM::MMATypes value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static MMATypesAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) MMATypesAttrStorage(std::move(value)); } ::mlir::NVVM::MMATypes value; }; } // namespace detail MMATypesAttr MMATypesAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::MMATypes value) { return Base::get(context, std::move(value)); } ::mlir::Attribute MMATypesAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::MMATypes> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::MMATypes> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeMMATypes(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::MMATypes" << " to be one of: " << "f16" << ", " << "f32" << ", " << "tf32" << ", " << "bf16" << ", " << "s8" << ", " << "u8" << ", " << "s32" << ", " << "s4" << ", " << "u4" << ", " << "b1" << ", " << "f64" << ", " << "e4m3" << ", " << "e5m2" << ", " << "e3m2" << ", " << "e2m3" << ", " << "e2m1")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse MMATypesAttr parameter 'value' which is to be a `::mlir::NVVM::MMATypes`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return MMATypesAttr::get(odsParser.getContext(), ::mlir::NVVM::MMATypes((*_result_value))); } void MMATypesAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyMMATypes(getValue()); odsPrinter << ">"; } ::mlir::NVVM::MMATypes MMATypesAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::MMATypesAttr) namespace mlir::NVVM { namespace detail { struct MMAFragAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::MMAFrag>; MMAFragAttrStorage(::mlir::NVVM::MMAFrag value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static MMAFragAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) MMAFragAttrStorage(std::move(value)); } ::mlir::NVVM::MMAFrag value; }; } // namespace detail MMAFragAttr MMAFragAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::MMAFrag value) { return Base::get(context, std::move(value)); } ::mlir::Attribute MMAFragAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::MMAFrag> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::MMAFrag> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeMMAFrag(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::MMAFrag" << " to be one of: " << "a" << ", " << "b" << ", " << "c")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse MMAFragAttr parameter 'value' which is to be a `::mlir::NVVM::MMAFrag`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return MMAFragAttr::get(odsParser.getContext(), ::mlir::NVVM::MMAFrag((*_result_value))); } void MMAFragAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyMMAFrag(getValue()); odsPrinter << ">"; } ::mlir::NVVM::MMAFrag MMAFragAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::MMAFragAttr) namespace mlir::NVVM { namespace detail { struct LdStMatrixShapeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple; LdStMatrixShapeAttrStorage(int m, int n) : m(std::move(m)), n(std::move(n)) {} KeyTy getAsKey() const { return KeyTy(m, n); } bool operator==(const KeyTy &tblgenKey) const { return (m == std::get<0>(tblgenKey)) && (n == std::get<1>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey), std::get<1>(tblgenKey)); } static LdStMatrixShapeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto m = std::move(std::get<0>(tblgenKey)); auto n = std::move(std::get<1>(tblgenKey)); return new (allocator.allocate()) LdStMatrixShapeAttrStorage(std::move(m), std::move(n)); } int m; int n; }; } // namespace detail LdStMatrixShapeAttr LdStMatrixShapeAttr::get(::mlir::MLIRContext *context, int m, int n) { return Base::get(context, std::move(m), std::move(n)); } ::mlir::Attribute LdStMatrixShapeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr _result_m; ::mlir::FailureOr _result_n; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse parameter struct bool _seen_m = false; bool _seen_n = false; { const auto _loop_body = [&](::llvm::StringRef _paramKey) -> bool { // Parse literal '=' if (odsParser.parseEqual()) return {}; if (!_seen_m && _paramKey == "m") { _seen_m = true; // Parse variable 'm' _result_m = ::mlir::FieldParser::parse(odsParser); if (::mlir::failed(_result_m)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse LdStMatrixShapeAttr parameter 'm' which is to be a `int`"); return {}; } } else if (!_seen_n && _paramKey == "n") { _seen_n = true; // Parse variable 'n' _result_n = ::mlir::FieldParser::parse(odsParser); if (::mlir::failed(_result_n)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse LdStMatrixShapeAttr parameter 'n' which is to be a `int`"); return {}; } } else { odsParser.emitError(odsParser.getCurrentLocation(), "duplicate or unknown struct parameter name: ") << _paramKey; return {}; } return true; }; for (unsigned odsStructIndex = 0; odsStructIndex < 2; ++odsStructIndex) { ::llvm::StringRef _paramKey; if (odsParser.parseKeyword(&_paramKey)) { odsParser.emitError(odsParser.getCurrentLocation(), "expected a parameter name in struct"); return {}; } if (!_loop_body(_paramKey)) return {}; if ((odsStructIndex != 2 - 1) && odsParser.parseComma()) return {}; } } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_m)); assert(::mlir::succeeded(_result_n)); return LdStMatrixShapeAttr::get(odsParser.getContext(), int((*_result_m)), int((*_result_n))); } void LdStMatrixShapeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; { bool _firstPrinted = true; if (!_firstPrinted) odsPrinter << ", "; _firstPrinted = false; odsPrinter << "m = "; odsPrinter.printStrippedAttrOrType(getM()); if (!_firstPrinted) odsPrinter << ", "; _firstPrinted = false; odsPrinter << "n = "; odsPrinter.printStrippedAttrOrType(getN()); } odsPrinter << ">"; } int LdStMatrixShapeAttr::getM() const { return getImpl()->m; } int LdStMatrixShapeAttr::getN() const { return getImpl()->n; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::LdStMatrixShapeAttr) namespace mlir::NVVM { namespace detail { struct LdStMatrixEltTypeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::LdStMatrixEltType>; LdStMatrixEltTypeAttrStorage(::mlir::NVVM::LdStMatrixEltType value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static LdStMatrixEltTypeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) LdStMatrixEltTypeAttrStorage(std::move(value)); } ::mlir::NVVM::LdStMatrixEltType value; }; } // namespace detail LdStMatrixEltTypeAttr LdStMatrixEltTypeAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::LdStMatrixEltType value) { return Base::get(context, std::move(value)); } ::mlir::Attribute LdStMatrixEltTypeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::LdStMatrixEltType> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::LdStMatrixEltType> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeLdStMatrixEltType(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::LdStMatrixEltType" << " to be one of: " << "b16" << ", " << "b8" << ", " << "b8x16.b6x16_p32" << ", " << "b8x16.b4x16_p64")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse LdStMatrixEltTypeAttr parameter 'value' which is to be a `::mlir::NVVM::LdStMatrixEltType`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return LdStMatrixEltTypeAttr::get(odsParser.getContext(), ::mlir::NVVM::LdStMatrixEltType((*_result_value))); } void LdStMatrixEltTypeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyLdStMatrixEltType(getValue()); odsPrinter << ">"; } ::mlir::NVVM::LdStMatrixEltType LdStMatrixEltTypeAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::LdStMatrixEltTypeAttr) namespace mlir::NVVM { namespace detail { struct ScaleVecSizeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::ScaleVecSize>; ScaleVecSizeAttrStorage(::mlir::NVVM::ScaleVecSize value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static ScaleVecSizeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) ScaleVecSizeAttrStorage(std::move(value)); } ::mlir::NVVM::ScaleVecSize value; }; } // namespace detail ScaleVecSizeAttr ScaleVecSizeAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::ScaleVecSize value) { return Base::get(context, std::move(value)); } ::mlir::Attribute ScaleVecSizeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::ScaleVecSize> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::ScaleVecSize> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeScaleVecSize(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::ScaleVecSize" << " to be one of: " << "x1" << ", " << "x2" << ", " << "x4")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse ScaleVecSizeAttr parameter 'value' which is to be a `::mlir::NVVM::ScaleVecSize`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return ScaleVecSizeAttr::get(odsParser.getContext(), ::mlir::NVVM::ScaleVecSize((*_result_value))); } void ScaleVecSizeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyScaleVecSize(getValue()); odsPrinter << ">"; } ::mlir::NVVM::ScaleVecSize ScaleVecSizeAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::ScaleVecSizeAttr) namespace mlir::NVVM { namespace detail { struct BlockScaleFormatAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::BlockScaleFormat>; BlockScaleFormatAttrStorage(::mlir::NVVM::BlockScaleFormat value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static BlockScaleFormatAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) BlockScaleFormatAttrStorage(std::move(value)); } ::mlir::NVVM::BlockScaleFormat value; }; } // namespace detail BlockScaleFormatAttr BlockScaleFormatAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::BlockScaleFormat value) { return Base::get(context, std::move(value)); } ::mlir::Attribute BlockScaleFormatAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::BlockScaleFormat> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::BlockScaleFormat> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeBlockScaleFormat(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::BlockScaleFormat" << " to be one of: " << "ue8m0" << ", " << "ue4m3")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse BlockScaleFormatAttr parameter 'value' which is to be a `::mlir::NVVM::BlockScaleFormat`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return BlockScaleFormatAttr::get(odsParser.getContext(), ::mlir::NVVM::BlockScaleFormat((*_result_value))); } void BlockScaleFormatAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyBlockScaleFormat(getValue()); odsPrinter << ">"; } ::mlir::NVVM::BlockScaleFormat BlockScaleFormatAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::BlockScaleFormatAttr) namespace mlir::NVVM { namespace detail { struct MMABlockScaleKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::MMABlockScaleKind>; MMABlockScaleKindAttrStorage(::mlir::NVVM::MMABlockScaleKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static MMABlockScaleKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) MMABlockScaleKindAttrStorage(std::move(value)); } ::mlir::NVVM::MMABlockScaleKind value; }; } // namespace detail MMABlockScaleKindAttr MMABlockScaleKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::MMABlockScaleKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute MMABlockScaleKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::MMABlockScaleKind> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::MMABlockScaleKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeMMABlockScaleKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::MMABlockScaleKind" << " to be one of: " << "mxf8f6f4" << ", " << "mxf4" << ", " << "mxf4nvf4")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse MMABlockScaleKindAttr parameter 'value' which is to be a `::mlir::NVVM::MMABlockScaleKind`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return MMABlockScaleKindAttr::get(odsParser.getContext(), ::mlir::NVVM::MMABlockScaleKind((*_result_value))); } void MMABlockScaleKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyMMABlockScaleKind(getValue()); odsPrinter << ">"; } ::mlir::NVVM::MMABlockScaleKind MMABlockScaleKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::MMABlockScaleKindAttr) namespace mlir::NVVM { namespace detail { struct TMALoadModeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::TMALoadMode>; TMALoadModeAttrStorage(::mlir::NVVM::TMALoadMode value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static TMALoadModeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) TMALoadModeAttrStorage(std::move(value)); } ::mlir::NVVM::TMALoadMode value; }; } // namespace detail TMALoadModeAttr TMALoadModeAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::TMALoadMode value) { return Base::get(context, std::move(value)); } ::mlir::Attribute TMALoadModeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::TMALoadMode> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::TMALoadMode> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeTMALoadMode(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::TMALoadMode" << " to be one of: " << "tile" << ", " << "im2col" << ", " << "im2col_w" << ", " << "im2col_w_128" << ", " << "tile_gather4")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse TMALoadModeAttr parameter 'value' which is to be a `::mlir::NVVM::TMALoadMode`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return TMALoadModeAttr::get(odsParser.getContext(), ::mlir::NVVM::TMALoadMode((*_result_value))); } void TMALoadModeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyTMALoadMode(getValue()); odsPrinter << ">"; } ::mlir::NVVM::TMALoadMode TMALoadModeAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::TMALoadModeAttr) namespace mlir::NVVM { namespace detail { struct TMAStoreModeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::TMAStoreMode>; TMAStoreModeAttrStorage(::mlir::NVVM::TMAStoreMode value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static TMAStoreModeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) TMAStoreModeAttrStorage(std::move(value)); } ::mlir::NVVM::TMAStoreMode value; }; } // namespace detail TMAStoreModeAttr TMAStoreModeAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::TMAStoreMode value) { return Base::get(context, std::move(value)); } ::mlir::Attribute TMAStoreModeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::TMAStoreMode> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::TMAStoreMode> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeTMAStoreMode(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::TMAStoreMode" << " to be one of: " << "tile" << ", " << "im2col" << ", " << "tile_scatter4")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse TMAStoreModeAttr parameter 'value' which is to be a `::mlir::NVVM::TMAStoreMode`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return TMAStoreModeAttr::get(odsParser.getContext(), ::mlir::NVVM::TMAStoreMode((*_result_value))); } void TMAStoreModeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyTMAStoreMode(getValue()); odsPrinter << ">"; } ::mlir::NVVM::TMAStoreMode TMAStoreModeAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::TMAStoreModeAttr) namespace mlir::NVVM { namespace detail { struct CTAGroupKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::CTAGroupKind>; CTAGroupKindAttrStorage(::mlir::NVVM::CTAGroupKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static CTAGroupKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) CTAGroupKindAttrStorage(std::move(value)); } ::mlir::NVVM::CTAGroupKind value; }; } // namespace detail CTAGroupKindAttr CTAGroupKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::CTAGroupKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute CTAGroupKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::CTAGroupKind> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::CTAGroupKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeCTAGroupKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::CTAGroupKind" << " to be one of: " << "cta_1" << ", " << "cta_2")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse CTAGroupKindAttr parameter 'value' which is to be a `::mlir::NVVM::CTAGroupKind`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return CTAGroupKindAttr::get(odsParser.getContext(), ::mlir::NVVM::CTAGroupKind((*_result_value))); } void CTAGroupKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyCTAGroupKind(getValue()); odsPrinter << ">"; } ::mlir::NVVM::CTAGroupKind CTAGroupKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::CTAGroupKindAttr) namespace mlir::NVVM { namespace detail { struct PrefetchCacheLevelAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::PrefetchCacheLevel>; PrefetchCacheLevelAttrStorage(::mlir::NVVM::PrefetchCacheLevel value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static PrefetchCacheLevelAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) PrefetchCacheLevelAttrStorage(std::move(value)); } ::mlir::NVVM::PrefetchCacheLevel value; }; } // namespace detail PrefetchCacheLevelAttr PrefetchCacheLevelAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::PrefetchCacheLevel value) { return Base::get(context, std::move(value)); } ::mlir::Attribute PrefetchCacheLevelAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::PrefetchCacheLevel> _result_value; // Parse variable 'value' _result_value = ::mlir::FieldParser<::mlir::NVVM::PrefetchCacheLevel>::parse(odsParser); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse PrefetchCacheLevelAttr parameter 'value' which is to be a `::mlir::NVVM::PrefetchCacheLevel`"); return {}; } assert(::mlir::succeeded(_result_value)); return PrefetchCacheLevelAttr::get(odsParser.getContext(), ::mlir::NVVM::PrefetchCacheLevel((*_result_value))); } void PrefetchCacheLevelAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter.printStrippedAttrOrType(getValue()); } ::mlir::NVVM::PrefetchCacheLevel PrefetchCacheLevelAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::PrefetchCacheLevelAttr) namespace mlir::NVVM { namespace detail { struct TMAReduxKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::TMAReduxKind>; TMAReduxKindAttrStorage(::mlir::NVVM::TMAReduxKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static TMAReduxKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) TMAReduxKindAttrStorage(std::move(value)); } ::mlir::NVVM::TMAReduxKind value; }; } // namespace detail TMAReduxKindAttr TMAReduxKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::TMAReduxKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute TMAReduxKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::TMAReduxKind> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::TMAReduxKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeTMAReduxKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::TMAReduxKind" << " to be one of: " << "add" << ", " << "max" << ", " << "min" << ", " << "inc" << ", " << "dec" << ", " << "and" << ", " << "or" << ", " << "xor")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse TMAReduxKindAttr parameter 'value' which is to be a `::mlir::NVVM::TMAReduxKind`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return TMAReduxKindAttr::get(odsParser.getContext(), ::mlir::NVVM::TMAReduxKind((*_result_value))); } void TMAReduxKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyTMAReduxKind(getValue()); odsPrinter << ">"; } ::mlir::NVVM::TMAReduxKind TMAReduxKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::TMAReduxKindAttr) namespace mlir::NVVM { namespace detail { struct WGMMAScaleInAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::WGMMAScaleIn>; WGMMAScaleInAttrStorage(::mlir::NVVM::WGMMAScaleIn value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static WGMMAScaleInAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) WGMMAScaleInAttrStorage(std::move(value)); } ::mlir::NVVM::WGMMAScaleIn value; }; } // namespace detail WGMMAScaleInAttr WGMMAScaleInAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::WGMMAScaleIn value) { return Base::get(context, std::move(value)); } ::mlir::Attribute WGMMAScaleInAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::WGMMAScaleIn> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::WGMMAScaleIn> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeWGMMAScaleIn(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::WGMMAScaleIn" << " to be one of: " << "one" << ", " << "neg")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse WGMMAScaleInAttr parameter 'value' which is to be a `::mlir::NVVM::WGMMAScaleIn`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return WGMMAScaleInAttr::get(odsParser.getContext(), ::mlir::NVVM::WGMMAScaleIn((*_result_value))); } void WGMMAScaleInAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyWGMMAScaleIn(getValue()); odsPrinter << ">"; } ::mlir::NVVM::WGMMAScaleIn WGMMAScaleInAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::WGMMAScaleInAttr) namespace mlir::NVVM { namespace detail { struct WGMMAScaleOutAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::WGMMAScaleOut>; WGMMAScaleOutAttrStorage(::mlir::NVVM::WGMMAScaleOut value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static WGMMAScaleOutAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) WGMMAScaleOutAttrStorage(std::move(value)); } ::mlir::NVVM::WGMMAScaleOut value; }; } // namespace detail WGMMAScaleOutAttr WGMMAScaleOutAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::WGMMAScaleOut value) { return Base::get(context, std::move(value)); } ::mlir::Attribute WGMMAScaleOutAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::WGMMAScaleOut> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::WGMMAScaleOut> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeWGMMAScaleOut(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::WGMMAScaleOut" << " to be one of: " << "zero" << ", " << "one")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse WGMMAScaleOutAttr parameter 'value' which is to be a `::mlir::NVVM::WGMMAScaleOut`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return WGMMAScaleOutAttr::get(odsParser.getContext(), ::mlir::NVVM::WGMMAScaleOut((*_result_value))); } void WGMMAScaleOutAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyWGMMAScaleOut(getValue()); odsPrinter << ">"; } ::mlir::NVVM::WGMMAScaleOut WGMMAScaleOutAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::WGMMAScaleOutAttr) namespace mlir::NVVM { namespace detail { struct WGMMATypesAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::WGMMATypes>; WGMMATypesAttrStorage(::mlir::NVVM::WGMMATypes value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static WGMMATypesAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) WGMMATypesAttrStorage(std::move(value)); } ::mlir::NVVM::WGMMATypes value; }; } // namespace detail WGMMATypesAttr WGMMATypesAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::WGMMATypes value) { return Base::get(context, std::move(value)); } ::mlir::Attribute WGMMATypesAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::WGMMATypes> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::WGMMATypes> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeWGMMATypes(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::WGMMATypes" << " to be one of: " << "f16" << ", " << "tf32" << ", " << "u8" << ", " << "s8" << ", " << "b1" << ", " << "bf16" << ", " << "e4m3" << ", " << "e5m2" << ", " << "f32" << ", " << "s32")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse WGMMATypesAttr parameter 'value' which is to be a `::mlir::NVVM::WGMMATypes`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return WGMMATypesAttr::get(odsParser.getContext(), ::mlir::NVVM::WGMMATypes((*_result_value))); } void WGMMATypesAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyWGMMATypes(getValue()); odsPrinter << ">"; } ::mlir::NVVM::WGMMATypes WGMMATypesAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::WGMMATypesAttr) namespace mlir::NVVM { namespace detail { struct GridDepActionKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::GridDepActionKind>; GridDepActionKindAttrStorage(::mlir::NVVM::GridDepActionKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static GridDepActionKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) GridDepActionKindAttrStorage(std::move(value)); } ::mlir::NVVM::GridDepActionKind value; }; } // namespace detail GridDepActionKindAttr GridDepActionKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::GridDepActionKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute GridDepActionKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::GridDepActionKind> _result_value; // Parse variable 'value' _result_value = ::mlir::FieldParser<::mlir::NVVM::GridDepActionKind>::parse(odsParser); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse GridDepActionAttr parameter 'value' which is to be a `::mlir::NVVM::GridDepActionKind`"); return {}; } assert(::mlir::succeeded(_result_value)); return GridDepActionKindAttr::get(odsParser.getContext(), ::mlir::NVVM::GridDepActionKind((*_result_value))); } void GridDepActionKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter.printStrippedAttrOrType(getValue()); } ::mlir::NVVM::GridDepActionKind GridDepActionKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::GridDepActionKindAttr) namespace mlir::NVVM { namespace detail { struct MatchSyncKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::MatchSyncKind>; MatchSyncKindAttrStorage(::mlir::NVVM::MatchSyncKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static MatchSyncKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) MatchSyncKindAttrStorage(std::move(value)); } ::mlir::NVVM::MatchSyncKind value; }; } // namespace detail MatchSyncKindAttr MatchSyncKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::MatchSyncKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute MatchSyncKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::MatchSyncKind> _result_value; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::MatchSyncKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeMatchSyncKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::MatchSyncKind" << " to be one of: " << "any" << ", " << "all")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse MatchSyncKindAttr parameter 'value' which is to be a `::mlir::NVVM::MatchSyncKind`"); return {}; } assert(::mlir::succeeded(_result_value)); return MatchSyncKindAttr::get(odsParser.getContext(), ::mlir::NVVM::MatchSyncKind((*_result_value))); } void MatchSyncKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << stringifyMatchSyncKind(getValue()); } ::mlir::NVVM::MatchSyncKind MatchSyncKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::MatchSyncKindAttr) namespace mlir::NVVM { namespace detail { struct Tcgen05FenceKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::Tcgen05FenceKind>; Tcgen05FenceKindAttrStorage(::mlir::NVVM::Tcgen05FenceKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static Tcgen05FenceKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) Tcgen05FenceKindAttrStorage(std::move(value)); } ::mlir::NVVM::Tcgen05FenceKind value; }; } // namespace detail Tcgen05FenceKindAttr Tcgen05FenceKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::Tcgen05FenceKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute Tcgen05FenceKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::Tcgen05FenceKind> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::Tcgen05FenceKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeTcgen05FenceKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::Tcgen05FenceKind" << " to be one of: " << "before" << ", " << "after")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse Tcgen05FenceKindAttr parameter 'value' which is to be a `::mlir::NVVM::Tcgen05FenceKind`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return Tcgen05FenceKindAttr::get(odsParser.getContext(), ::mlir::NVVM::Tcgen05FenceKind((*_result_value))); } void Tcgen05FenceKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyTcgen05FenceKind(getValue()); odsPrinter << ">"; } ::mlir::NVVM::Tcgen05FenceKind Tcgen05FenceKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05FenceKindAttr) namespace mlir::NVVM { namespace detail { struct Tcgen05WaitKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::Tcgen05WaitKind>; Tcgen05WaitKindAttrStorage(::mlir::NVVM::Tcgen05WaitKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static Tcgen05WaitKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) Tcgen05WaitKindAttrStorage(std::move(value)); } ::mlir::NVVM::Tcgen05WaitKind value; }; } // namespace detail Tcgen05WaitKindAttr Tcgen05WaitKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::Tcgen05WaitKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute Tcgen05WaitKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::Tcgen05WaitKind> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::Tcgen05WaitKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeTcgen05WaitKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::Tcgen05WaitKind" << " to be one of: " << "load" << ", " << "store")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse Tcgen05WaitKindAttr parameter 'value' which is to be a `::mlir::NVVM::Tcgen05WaitKind`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return Tcgen05WaitKindAttr::get(odsParser.getContext(), ::mlir::NVVM::Tcgen05WaitKind((*_result_value))); } void Tcgen05WaitKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyTcgen05WaitKind(getValue()); odsPrinter << ">"; } ::mlir::NVVM::Tcgen05WaitKind Tcgen05WaitKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05WaitKindAttr) namespace mlir::NVVM { namespace detail { struct Tcgen05CpShapeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::Tcgen05CpShape>; Tcgen05CpShapeAttrStorage(::mlir::NVVM::Tcgen05CpShape value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static Tcgen05CpShapeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) Tcgen05CpShapeAttrStorage(std::move(value)); } ::mlir::NVVM::Tcgen05CpShape value; }; } // namespace detail Tcgen05CpShapeAttr Tcgen05CpShapeAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::Tcgen05CpShape value) { return Base::get(context, std::move(value)); } ::mlir::Attribute Tcgen05CpShapeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::Tcgen05CpShape> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::Tcgen05CpShape> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeTcgen05CpShape(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::Tcgen05CpShape" << " to be one of: " << "shape_128x256b" << ", " << "shape_4x256b" << ", " << "shape_128x128b" << ", " << "shape_64x128b" << ", " << "shape_32x128b")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse Tcgen05CpShapeAttr parameter 'value' which is to be a `::mlir::NVVM::Tcgen05CpShape`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return Tcgen05CpShapeAttr::get(odsParser.getContext(), ::mlir::NVVM::Tcgen05CpShape((*_result_value))); } void Tcgen05CpShapeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyTcgen05CpShape(getValue()); odsPrinter << ">"; } ::mlir::NVVM::Tcgen05CpShape Tcgen05CpShapeAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05CpShapeAttr) namespace mlir::NVVM { namespace detail { struct Tcgen05CpMulticastAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::Tcgen05CpMulticast>; Tcgen05CpMulticastAttrStorage(::mlir::NVVM::Tcgen05CpMulticast value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static Tcgen05CpMulticastAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) Tcgen05CpMulticastAttrStorage(std::move(value)); } ::mlir::NVVM::Tcgen05CpMulticast value; }; } // namespace detail Tcgen05CpMulticastAttr Tcgen05CpMulticastAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::Tcgen05CpMulticast value) { return Base::get(context, std::move(value)); } ::mlir::Attribute Tcgen05CpMulticastAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::Tcgen05CpMulticast> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::Tcgen05CpMulticast> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeTcgen05CpMulticast(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::Tcgen05CpMulticast" << " to be one of: " << "none" << ", " << "warpx2_02_13" << ", " << "warpx2_01_23" << ", " << "warpx4")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse Tcgen05CpMulticastAttr parameter 'value' which is to be a `::mlir::NVVM::Tcgen05CpMulticast`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return Tcgen05CpMulticastAttr::get(odsParser.getContext(), ::mlir::NVVM::Tcgen05CpMulticast((*_result_value))); } void Tcgen05CpMulticastAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyTcgen05CpMulticast(getValue()); odsPrinter << ">"; } ::mlir::NVVM::Tcgen05CpMulticast Tcgen05CpMulticastAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05CpMulticastAttr) namespace mlir::NVVM { namespace detail { struct Tcgen05CpSrcFormatAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::Tcgen05CpSrcFormat>; Tcgen05CpSrcFormatAttrStorage(::mlir::NVVM::Tcgen05CpSrcFormat value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static Tcgen05CpSrcFormatAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) Tcgen05CpSrcFormatAttrStorage(std::move(value)); } ::mlir::NVVM::Tcgen05CpSrcFormat value; }; } // namespace detail Tcgen05CpSrcFormatAttr Tcgen05CpSrcFormatAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::Tcgen05CpSrcFormat value) { return Base::get(context, std::move(value)); } ::mlir::Attribute Tcgen05CpSrcFormatAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::Tcgen05CpSrcFormat> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::Tcgen05CpSrcFormat> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeTcgen05CpSrcFormat(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::Tcgen05CpSrcFormat" << " to be one of: " << "b6x16_p32" << ", " << "b4x16_p64")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse Tcgen05CpSrcFormatAttr parameter 'value' which is to be a `::mlir::NVVM::Tcgen05CpSrcFormat`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return Tcgen05CpSrcFormatAttr::get(odsParser.getContext(), ::mlir::NVVM::Tcgen05CpSrcFormat((*_result_value))); } void Tcgen05CpSrcFormatAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyTcgen05CpSrcFormat(getValue()); odsPrinter << ">"; } ::mlir::NVVM::Tcgen05CpSrcFormat Tcgen05CpSrcFormatAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05CpSrcFormatAttr) namespace mlir::NVVM { namespace detail { struct Tcgen05LdStShapeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::Tcgen05LdStShape>; Tcgen05LdStShapeAttrStorage(::mlir::NVVM::Tcgen05LdStShape value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static Tcgen05LdStShapeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) Tcgen05LdStShapeAttrStorage(std::move(value)); } ::mlir::NVVM::Tcgen05LdStShape value; }; } // namespace detail Tcgen05LdStShapeAttr Tcgen05LdStShapeAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::Tcgen05LdStShape value) { return Base::get(context, std::move(value)); } ::mlir::Attribute Tcgen05LdStShapeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::Tcgen05LdStShape> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::Tcgen05LdStShape> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeTcgen05LdStShape(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::Tcgen05LdStShape" << " to be one of: " << "shape_16x64b" << ", " << "shape_16x128b" << ", " << "shape_16x256b" << ", " << "shape_32x32b" << ", " << "shape_16x32bx2")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse Tcgen05LdStShapeAttr parameter 'value' which is to be a `::mlir::NVVM::Tcgen05LdStShape`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return Tcgen05LdStShapeAttr::get(odsParser.getContext(), ::mlir::NVVM::Tcgen05LdStShape((*_result_value))); } void Tcgen05LdStShapeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyTcgen05LdStShape(getValue()); odsPrinter << ">"; } ::mlir::NVVM::Tcgen05LdStShape Tcgen05LdStShapeAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05LdStShapeAttr) namespace mlir::NVVM { namespace detail { struct DotAccumulateTypeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::DotAccumulateType>; DotAccumulateTypeAttrStorage(::mlir::NVVM::DotAccumulateType value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static DotAccumulateTypeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) DotAccumulateTypeAttrStorage(std::move(value)); } ::mlir::NVVM::DotAccumulateType value; }; } // namespace detail DotAccumulateTypeAttr DotAccumulateTypeAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::DotAccumulateType value) { return Base::get(context, std::move(value)); } ::mlir::Attribute DotAccumulateTypeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::DotAccumulateType> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::DotAccumulateType> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeDotAccumulateType(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::DotAccumulateType" << " to be one of: " << "signed" << ", " << "unsigned")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse DotAccumulateTypeAttr parameter 'value' which is to be a `::mlir::NVVM::DotAccumulateType`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return DotAccumulateTypeAttr::get(odsParser.getContext(), ::mlir::NVVM::DotAccumulateType((*_result_value))); } void DotAccumulateTypeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyDotAccumulateType(getValue()); odsPrinter << ">"; } ::mlir::NVVM::DotAccumulateType DotAccumulateTypeAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::DotAccumulateTypeAttr) namespace mlir::NVVM { namespace detail { struct ClusterLaunchControlQueryTypeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::ClusterLaunchControlQueryType>; ClusterLaunchControlQueryTypeAttrStorage(::mlir::NVVM::ClusterLaunchControlQueryType value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static ClusterLaunchControlQueryTypeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) ClusterLaunchControlQueryTypeAttrStorage(std::move(value)); } ::mlir::NVVM::ClusterLaunchControlQueryType value; }; } // namespace detail ClusterLaunchControlQueryTypeAttr ClusterLaunchControlQueryTypeAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::ClusterLaunchControlQueryType value) { return Base::get(context, std::move(value)); } ::mlir::Attribute ClusterLaunchControlQueryTypeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::ClusterLaunchControlQueryType> _result_value; // Parse variable 'value' _result_value = ::mlir::FieldParser<::mlir::NVVM::ClusterLaunchControlQueryType>::parse(odsParser); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse ClusterLaunchControlQueryTypeAttr parameter 'value' which is to be a `::mlir::NVVM::ClusterLaunchControlQueryType`"); return {}; } assert(::mlir::succeeded(_result_value)); return ClusterLaunchControlQueryTypeAttr::get(odsParser.getContext(), ::mlir::NVVM::ClusterLaunchControlQueryType((*_result_value))); } void ClusterLaunchControlQueryTypeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter.printStrippedAttrOrType(getValue()); } ::mlir::NVVM::ClusterLaunchControlQueryType ClusterLaunchControlQueryTypeAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::ClusterLaunchControlQueryTypeAttr) namespace mlir::NVVM { namespace detail { struct Tcgen05MMAKindAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::Tcgen05MMAKind>; Tcgen05MMAKindAttrStorage(::mlir::NVVM::Tcgen05MMAKind value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static Tcgen05MMAKindAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) Tcgen05MMAKindAttrStorage(std::move(value)); } ::mlir::NVVM::Tcgen05MMAKind value; }; } // namespace detail Tcgen05MMAKindAttr Tcgen05MMAKindAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::Tcgen05MMAKind value) { return Base::get(context, std::move(value)); } ::mlir::Attribute Tcgen05MMAKindAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::Tcgen05MMAKind> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::Tcgen05MMAKind> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeTcgen05MMAKind(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::Tcgen05MMAKind" << " to be one of: " << "f16" << ", " << "tf32" << ", " << "f8f6f4" << ", " << "i8" << ", " << "mxf8f6f4" << ", " << "mxf4" << ", " << "mxf4nvf4")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse Tcgen05MMAKindAttr parameter 'value' which is to be a `::mlir::NVVM::Tcgen05MMAKind`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return Tcgen05MMAKindAttr::get(odsParser.getContext(), ::mlir::NVVM::Tcgen05MMAKind((*_result_value))); } void Tcgen05MMAKindAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyTcgen05MMAKind(getValue()); odsPrinter << ">"; } ::mlir::NVVM::Tcgen05MMAKind Tcgen05MMAKindAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05MMAKindAttr) namespace mlir::NVVM { namespace detail { struct Tcgen05MMACollectorOpAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::Tcgen05MMACollectorOp>; Tcgen05MMACollectorOpAttrStorage(::mlir::NVVM::Tcgen05MMACollectorOp value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static Tcgen05MMACollectorOpAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) Tcgen05MMACollectorOpAttrStorage(std::move(value)); } ::mlir::NVVM::Tcgen05MMACollectorOp value; }; } // namespace detail Tcgen05MMACollectorOpAttr Tcgen05MMACollectorOpAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::Tcgen05MMACollectorOp value) { return Base::get(context, std::move(value)); } ::mlir::Attribute Tcgen05MMACollectorOpAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::Tcgen05MMACollectorOp> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::Tcgen05MMACollectorOp> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeTcgen05MMACollectorOp(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::Tcgen05MMACollectorOp" << " to be one of: " << "discard" << ", " << "lastuse" << ", " << "fill" << ", " << "use")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse Tcgen05MMACollectorOpAttr parameter 'value' which is to be a `::mlir::NVVM::Tcgen05MMACollectorOp`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return Tcgen05MMACollectorOpAttr::get(odsParser.getContext(), ::mlir::NVVM::Tcgen05MMACollectorOp((*_result_value))); } void Tcgen05MMACollectorOpAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyTcgen05MMACollectorOp(getValue()); odsPrinter << ">"; } ::mlir::NVVM::Tcgen05MMACollectorOp Tcgen05MMACollectorOpAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05MMACollectorOpAttr) namespace mlir::NVVM { namespace detail { struct Tcgen05MMABlockScaleAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::Tcgen05MMABlockScale>; Tcgen05MMABlockScaleAttrStorage(::mlir::NVVM::Tcgen05MMABlockScale value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static Tcgen05MMABlockScaleAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) Tcgen05MMABlockScaleAttrStorage(std::move(value)); } ::mlir::NVVM::Tcgen05MMABlockScale value; }; } // namespace detail Tcgen05MMABlockScaleAttr Tcgen05MMABlockScaleAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::Tcgen05MMABlockScale value) { return Base::get(context, std::move(value)); } ::mlir::Attribute Tcgen05MMABlockScaleAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::Tcgen05MMABlockScale> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::Tcgen05MMABlockScale> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeTcgen05MMABlockScale(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::Tcgen05MMABlockScale" << " to be one of: " << "default" << ", " << "block16" << ", " << "block32")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse Tcgen05MMABlockScaleAttr parameter 'value' which is to be a `::mlir::NVVM::Tcgen05MMABlockScale`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return Tcgen05MMABlockScaleAttr::get(odsParser.getContext(), ::mlir::NVVM::Tcgen05MMABlockScale((*_result_value))); } void Tcgen05MMABlockScaleAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyTcgen05MMABlockScale(getValue()); odsPrinter << ">"; } ::mlir::NVVM::Tcgen05MMABlockScale Tcgen05MMABlockScaleAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05MMABlockScaleAttr) namespace mlir::NVVM { namespace detail { struct Tcgen05MMACollectorBBufferAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::Tcgen05MMACollectorBBuffer>; Tcgen05MMACollectorBBufferAttrStorage(::mlir::NVVM::Tcgen05MMACollectorBBuffer value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static Tcgen05MMACollectorBBufferAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) Tcgen05MMACollectorBBufferAttrStorage(std::move(value)); } ::mlir::NVVM::Tcgen05MMACollectorBBuffer value; }; } // namespace detail Tcgen05MMACollectorBBufferAttr Tcgen05MMACollectorBBufferAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::Tcgen05MMACollectorBBuffer value) { return Base::get(context, std::move(value)); } ::mlir::Attribute Tcgen05MMACollectorBBufferAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::Tcgen05MMACollectorBBuffer> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = [&]() -> ::mlir::FailureOr<::mlir::NVVM::Tcgen05MMACollectorBBuffer> { auto loc = odsParser.getCurrentLocation(); std::string enumKeyword; if (::mlir::failed(odsParser.parseKeywordOrString(&enumKeyword))) return ::mlir::failure(); auto maybeEnum = ::mlir::NVVM::symbolizeTcgen05MMACollectorBBuffer(enumKeyword); if (maybeEnum) return *maybeEnum; return {(::llvm::LogicalResult)(odsParser.emitError(loc) << "expected " << "::mlir::NVVM::Tcgen05MMACollectorBBuffer" << " to be one of: " << "b0" << ", " << "b1" << ", " << "b2" << ", " << "b3")}; }(); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse Tcgen05MMACollectorBBufferAttr parameter 'value' which is to be a `::mlir::NVVM::Tcgen05MMACollectorBBuffer`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return Tcgen05MMACollectorBBufferAttr::get(odsParser.getContext(), ::mlir::NVVM::Tcgen05MMACollectorBBuffer((*_result_value))); } void Tcgen05MMACollectorBBufferAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter << stringifyTcgen05MMACollectorBBuffer(getValue()); odsPrinter << ">"; } ::mlir::NVVM::Tcgen05MMACollectorBBuffer Tcgen05MMACollectorBBufferAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::Tcgen05MMACollectorBBufferAttr) namespace mlir::NVVM { namespace detail { struct TensormapFieldAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::TensormapField>; TensormapFieldAttrStorage(::mlir::NVVM::TensormapField value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static TensormapFieldAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) TensormapFieldAttrStorage(std::move(value)); } ::mlir::NVVM::TensormapField value; }; } // namespace detail TensormapFieldAttr TensormapFieldAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::TensormapField value) { return Base::get(context, std::move(value)); } ::mlir::Attribute TensormapFieldAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::TensormapField> _result_value; // Parse variable 'value' _result_value = ::mlir::FieldParser<::mlir::NVVM::TensormapField>::parse(odsParser); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse TensormapFieldAttr parameter 'value' which is to be a `::mlir::NVVM::TensormapField`"); return {}; } assert(::mlir::succeeded(_result_value)); return TensormapFieldAttr::get(odsParser.getContext(), ::mlir::NVVM::TensormapField((*_result_value))); } void TensormapFieldAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter.printStrippedAttrOrType(getValue()); } ::mlir::NVVM::TensormapField TensormapFieldAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::TensormapFieldAttr) namespace mlir::NVVM { namespace detail { struct TensormapElemtypeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::TensormapElemtype>; TensormapElemtypeAttrStorage(::mlir::NVVM::TensormapElemtype value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static TensormapElemtypeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) TensormapElemtypeAttrStorage(std::move(value)); } ::mlir::NVVM::TensormapElemtype value; }; } // namespace detail TensormapElemtypeAttr TensormapElemtypeAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::TensormapElemtype value) { return Base::get(context, std::move(value)); } ::mlir::Attribute TensormapElemtypeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::TensormapElemtype> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = ::mlir::FieldParser<::mlir::NVVM::TensormapElemtype>::parse(odsParser); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse TensormapElemtypeAttr parameter 'value' which is to be a `::mlir::NVVM::TensormapElemtype`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return TensormapElemtypeAttr::get(odsParser.getContext(), ::mlir::NVVM::TensormapElemtype((*_result_value))); } void TensormapElemtypeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter.printStrippedAttrOrType(getValue()); odsPrinter << ">"; } ::mlir::NVVM::TensormapElemtype TensormapElemtypeAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::TensormapElemtypeAttr) namespace mlir::NVVM { namespace detail { struct TensormapInterleaveLayoutAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::TensormapInterleaveLayout>; TensormapInterleaveLayoutAttrStorage(::mlir::NVVM::TensormapInterleaveLayout value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static TensormapInterleaveLayoutAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) TensormapInterleaveLayoutAttrStorage(std::move(value)); } ::mlir::NVVM::TensormapInterleaveLayout value; }; } // namespace detail TensormapInterleaveLayoutAttr TensormapInterleaveLayoutAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::TensormapInterleaveLayout value) { return Base::get(context, std::move(value)); } ::mlir::Attribute TensormapInterleaveLayoutAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::TensormapInterleaveLayout> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = ::mlir::FieldParser<::mlir::NVVM::TensormapInterleaveLayout>::parse(odsParser); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse TensormapInterleaveLayoutAttr parameter 'value' which is to be a `::mlir::NVVM::TensormapInterleaveLayout`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return TensormapInterleaveLayoutAttr::get(odsParser.getContext(), ::mlir::NVVM::TensormapInterleaveLayout((*_result_value))); } void TensormapInterleaveLayoutAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter.printStrippedAttrOrType(getValue()); odsPrinter << ">"; } ::mlir::NVVM::TensormapInterleaveLayout TensormapInterleaveLayoutAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::TensormapInterleaveLayoutAttr) namespace mlir::NVVM { namespace detail { struct TensormapSwizzleModeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::TensormapSwizzleMode>; TensormapSwizzleModeAttrStorage(::mlir::NVVM::TensormapSwizzleMode value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static TensormapSwizzleModeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) TensormapSwizzleModeAttrStorage(std::move(value)); } ::mlir::NVVM::TensormapSwizzleMode value; }; } // namespace detail TensormapSwizzleModeAttr TensormapSwizzleModeAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::TensormapSwizzleMode value) { return Base::get(context, std::move(value)); } ::mlir::Attribute TensormapSwizzleModeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::TensormapSwizzleMode> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = ::mlir::FieldParser<::mlir::NVVM::TensormapSwizzleMode>::parse(odsParser); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse TensormapSwizzleModeAttr parameter 'value' which is to be a `::mlir::NVVM::TensormapSwizzleMode`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return TensormapSwizzleModeAttr::get(odsParser.getContext(), ::mlir::NVVM::TensormapSwizzleMode((*_result_value))); } void TensormapSwizzleModeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter.printStrippedAttrOrType(getValue()); odsPrinter << ">"; } ::mlir::NVVM::TensormapSwizzleMode TensormapSwizzleModeAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::TensormapSwizzleModeAttr) namespace mlir::NVVM { namespace detail { struct TensormapSwizzleAtomicityAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::TensormapSwizzleAtomicity>; TensormapSwizzleAtomicityAttrStorage(::mlir::NVVM::TensormapSwizzleAtomicity value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static TensormapSwizzleAtomicityAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) TensormapSwizzleAtomicityAttrStorage(std::move(value)); } ::mlir::NVVM::TensormapSwizzleAtomicity value; }; } // namespace detail TensormapSwizzleAtomicityAttr TensormapSwizzleAtomicityAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::TensormapSwizzleAtomicity value) { return Base::get(context, std::move(value)); } ::mlir::Attribute TensormapSwizzleAtomicityAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::TensormapSwizzleAtomicity> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = ::mlir::FieldParser<::mlir::NVVM::TensormapSwizzleAtomicity>::parse(odsParser); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse TensormapSwizzleAtomicityAttr parameter 'value' which is to be a `::mlir::NVVM::TensormapSwizzleAtomicity`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return TensormapSwizzleAtomicityAttr::get(odsParser.getContext(), ::mlir::NVVM::TensormapSwizzleAtomicity((*_result_value))); } void TensormapSwizzleAtomicityAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter.printStrippedAttrOrType(getValue()); odsPrinter << ">"; } ::mlir::NVVM::TensormapSwizzleAtomicity TensormapSwizzleAtomicityAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::TensormapSwizzleAtomicityAttr) namespace mlir::NVVM { namespace detail { struct TensormapFillModeAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple<::mlir::NVVM::TensormapFillMode>; TensormapFillModeAttrStorage(::mlir::NVVM::TensormapFillMode value) : value(std::move(value)) {} KeyTy getAsKey() const { return KeyTy(value); } bool operator==(const KeyTy &tblgenKey) const { return (value == std::get<0>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey)); } static TensormapFillModeAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto value = std::move(std::get<0>(tblgenKey)); return new (allocator.allocate()) TensormapFillModeAttrStorage(std::move(value)); } ::mlir::NVVM::TensormapFillMode value; }; } // namespace detail TensormapFillModeAttr TensormapFillModeAttr::get(::mlir::MLIRContext *context, ::mlir::NVVM::TensormapFillMode value) { return Base::get(context, std::move(value)); } ::mlir::Attribute TensormapFillModeAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr<::mlir::NVVM::TensormapFillMode> _result_value; // Parse literal '<' if (odsParser.parseLess()) return {}; // Parse variable 'value' _result_value = ::mlir::FieldParser<::mlir::NVVM::TensormapFillMode>::parse(odsParser); if (::mlir::failed(_result_value)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse TensormapFillModeAttr parameter 'value' which is to be a `::mlir::NVVM::TensormapFillMode`"); return {}; } // Parse literal '>' if (odsParser.parseGreater()) return {}; assert(::mlir::succeeded(_result_value)); return TensormapFillModeAttr::get(odsParser.getContext(), ::mlir::NVVM::TensormapFillMode((*_result_value))); } void TensormapFillModeAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); odsPrinter << "<"; odsPrinter.printStrippedAttrOrType(getValue()); odsPrinter << ">"; } ::mlir::NVVM::TensormapFillMode TensormapFillModeAttr::getValue() const { return getImpl()->value; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::TensormapFillModeAttr) namespace mlir::NVVM { namespace detail { struct NVVMTargetAttrStorage : public ::mlir::AttributeStorage { using KeyTy = std::tuple; NVVMTargetAttrStorage(int O, ::llvm::StringRef triple, ::llvm::StringRef chip, ::llvm::StringRef features, DictionaryAttr flags, ArrayAttr link, bool verifyTarget) : O(std::move(O)), triple(std::move(triple)), chip(std::move(chip)), features(std::move(features)), flags(std::move(flags)), link(std::move(link)), verifyTarget(std::move(verifyTarget)) {} KeyTy getAsKey() const { return KeyTy(O, triple, chip, features, flags, link, verifyTarget); } bool operator==(const KeyTy &tblgenKey) const { return (O == std::get<0>(tblgenKey)) && (triple == std::get<1>(tblgenKey)) && (chip == std::get<2>(tblgenKey)) && (features == std::get<3>(tblgenKey)) && (flags == std::get<4>(tblgenKey)) && (link == std::get<5>(tblgenKey)) && (verifyTarget == std::get<6>(tblgenKey)); } static ::llvm::hash_code hashKey(const KeyTy &tblgenKey) { return ::llvm::hash_combine(std::get<0>(tblgenKey), std::get<1>(tblgenKey), std::get<2>(tblgenKey), std::get<3>(tblgenKey), std::get<4>(tblgenKey), std::get<5>(tblgenKey), std::get<6>(tblgenKey)); } static NVVMTargetAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey) { auto O = std::move(std::get<0>(tblgenKey)); auto triple = std::move(std::get<1>(tblgenKey)); auto chip = std::move(std::get<2>(tblgenKey)); auto features = std::move(std::get<3>(tblgenKey)); auto flags = std::move(std::get<4>(tblgenKey)); auto link = std::move(std::get<5>(tblgenKey)); auto verifyTarget = std::move(std::get<6>(tblgenKey)); triple = allocator.copyInto(triple); chip = allocator.copyInto(chip); features = allocator.copyInto(features); return new (allocator.allocate()) NVVMTargetAttrStorage(std::move(O), std::move(triple), std::move(chip), std::move(features), std::move(flags), std::move(link), std::move(verifyTarget)); } int O; ::llvm::StringRef triple; ::llvm::StringRef chip; ::llvm::StringRef features; DictionaryAttr flags; ArrayAttr link; bool verifyTarget; }; } // namespace detail bool NVVMTargetAttr::hasFlag(StringRef flag) const { if (DictionaryAttr flags = getFlags()) return flags.get(flag) != nullptr; return false; } bool NVVMTargetAttr::hasFastMath() const { return hasFlag("fast"); } bool NVVMTargetAttr::hasFtz() const { return hasFlag("ftz"); } bool NVVMTargetAttr::hasCmdOptions() const { return hasFlag("ptxas-cmd-options"); } std::optional NVVMTargetAttr::getCmdOptions() const { return getFlags().getNamed("ptxas-cmd-options"); } NVVMTargetAttr NVVMTargetAttr::get(::mlir::MLIRContext *context, int optLevel, StringRef triple, StringRef chip, StringRef features, DictionaryAttr targetFlags, ArrayAttr linkFiles, bool verifyTarget) { return Base::get(context, optLevel, triple, chip, features, targetFlags, linkFiles, verifyTarget); } NVVMTargetAttr NVVMTargetAttr::getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, int optLevel, StringRef triple, StringRef chip, StringRef features, DictionaryAttr targetFlags, ArrayAttr linkFiles, bool verifyTarget) { return Base::getChecked(emitError, context, optLevel, triple, chip, features, targetFlags, linkFiles, verifyTarget); } ::llvm::LogicalResult NVVMTargetAttr::verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int O, ::llvm::StringRef triple, ::llvm::StringRef chip, ::llvm::StringRef features, DictionaryAttr flags, ArrayAttr link, bool verifyTarget) { if (::mlir::failed(verify(emitError, O, triple, chip, features, flags, link, verifyTarget))) return ::mlir::failure(); return ::mlir::success(); } ::mlir::Attribute NVVMTargetAttr::parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType) { ::mlir::Builder odsBuilder(odsParser.getContext()); ::llvm::SMLoc odsLoc = odsParser.getCurrentLocation(); (void) odsLoc; ::mlir::FailureOr _result_O; ::mlir::FailureOr _result_triple; ::mlir::FailureOr _result_chip; ::mlir::FailureOr _result_features; ::mlir::FailureOr _result_flags; ::mlir::FailureOr _result_link; ::mlir::FailureOr _result_verifyTarget; // Parse literal '<' if (odsParser.parseOptionalLess()) { } else { // Parse parameter struct bool _seen_O = false; bool _seen_triple = false; bool _seen_chip = false; bool _seen_features = false; bool _seen_flags = false; bool _seen_link = false; bool _seen_verifyTarget = false; { const auto _loop_body = [&](::llvm::StringRef _paramKey) -> bool { // Parse literal '=' if (odsParser.parseEqual()) return {}; if (!_seen_O && _paramKey == "O") { _seen_O = true; // Parse variable 'O' _result_O = ::mlir::FieldParser::parse(odsParser); if (::mlir::failed(_result_O)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse NVVM_TargetAttr parameter 'O' which is to be a `int`"); return {}; } } else if (!_seen_triple && _paramKey == "triple") { _seen_triple = true; // Parse variable 'triple' _result_triple = ::mlir::FieldParser::parse(odsParser); if (::mlir::failed(_result_triple)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse NVVM_TargetAttr parameter 'triple' which is to be a `::llvm::StringRef`"); return {}; } } else if (!_seen_chip && _paramKey == "chip") { _seen_chip = true; // Parse variable 'chip' _result_chip = ::mlir::FieldParser::parse(odsParser); if (::mlir::failed(_result_chip)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse NVVM_TargetAttr parameter 'chip' which is to be a `::llvm::StringRef`"); return {}; } } else if (!_seen_features && _paramKey == "features") { _seen_features = true; // Parse variable 'features' _result_features = ::mlir::FieldParser::parse(odsParser); if (::mlir::failed(_result_features)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse NVVM_TargetAttr parameter 'features' which is to be a `::llvm::StringRef`"); return {}; } } else if (!_seen_flags && _paramKey == "flags") { _seen_flags = true; // Parse variable 'flags' _result_flags = ::mlir::FieldParser::parse(odsParser); if (::mlir::failed(_result_flags)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse NVVM_TargetAttr parameter 'flags' which is to be a `DictionaryAttr`"); return {}; } } else if (!_seen_link && _paramKey == "link") { _seen_link = true; // Parse variable 'link' _result_link = ::mlir::FieldParser::parse(odsParser); if (::mlir::failed(_result_link)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse NVVM_TargetAttr parameter 'link' which is to be a `ArrayAttr`"); return {}; } } else if (!_seen_verifyTarget && _paramKey == "verifyTarget") { _seen_verifyTarget = true; // Parse variable 'verifyTarget' _result_verifyTarget = ::mlir::FieldParser::parse(odsParser); if (::mlir::failed(_result_verifyTarget)) { odsParser.emitError(odsParser.getCurrentLocation(), "failed to parse NVVM_TargetAttr parameter 'verifyTarget' which is to be a `bool`"); return {}; } } else { odsParser.emitError(odsParser.getCurrentLocation(), "duplicate or unknown struct parameter name: ") << _paramKey; return {}; } return true; }; ::llvm::StringRef _paramKey; if (!odsParser.parseOptionalKeyword(&_paramKey)) { if (!_loop_body(_paramKey)) return {}; while (!odsParser.parseOptionalComma()) { ::llvm::StringRef _paramKey; if (odsParser.parseKeyword(&_paramKey)) { odsParser.emitError(odsParser.getCurrentLocation(), "expected a parameter name in struct"); return {}; } if (!_loop_body(_paramKey)) return {}; } } } // Parse literal '>' if (odsParser.parseGreater()) return {}; } return odsParser.getChecked(odsLoc, odsParser.getContext(), int((_result_O.value_or(2))), ::llvm::StringRef((_result_triple.value_or("nvptx64-nvidia-cuda"))), ::llvm::StringRef((_result_chip.value_or("sm_75"))), ::llvm::StringRef((_result_features.value_or(""))), DictionaryAttr((_result_flags.value_or(DictionaryAttr()))), ArrayAttr((_result_link.value_or(ArrayAttr()))), bool((_result_verifyTarget.value_or(true)))); } void NVVMTargetAttr::print(::mlir::AsmPrinter &odsPrinter) const { ::mlir::Builder odsBuilder(getContext()); if (!(getO() == 2) || !(getTriple() == "nvptx64-nvidia-cuda") || !(getChip() == "sm_75") || !(getFeatures() == "") || !(getFlags() == DictionaryAttr()) || !(getLink() == ArrayAttr()) || !(getVerifyTarget() == true)) { odsPrinter << "<"; { bool _firstPrinted = true; if (!(getO() == 2)) { if (!_firstPrinted) odsPrinter << ", "; _firstPrinted = false; odsPrinter << "O = "; if (!(getO() == 2)) { odsPrinter.printStrippedAttrOrType(getO()); } } if (!(getTriple() == "nvptx64-nvidia-cuda")) { if (!_firstPrinted) odsPrinter << ", "; _firstPrinted = false; odsPrinter << "triple = "; if (!(getTriple() == "nvptx64-nvidia-cuda")) { odsPrinter.printString(getTriple());; } } if (!(getChip() == "sm_75")) { if (!_firstPrinted) odsPrinter << ", "; _firstPrinted = false; odsPrinter << "chip = "; if (!(getChip() == "sm_75")) { odsPrinter.printString(getChip());; } } if (!(getFeatures() == "")) { if (!_firstPrinted) odsPrinter << ", "; _firstPrinted = false; odsPrinter << "features = "; if (!(getFeatures() == "")) { odsPrinter.printString(getFeatures());; } } if (!(getFlags() == DictionaryAttr())) { if (!_firstPrinted) odsPrinter << ", "; _firstPrinted = false; odsPrinter << "flags = "; if (!(getFlags() == DictionaryAttr())) { odsPrinter.printStrippedAttrOrType(getFlags()); } } if (!(getLink() == ArrayAttr())) { if (!_firstPrinted) odsPrinter << ", "; _firstPrinted = false; odsPrinter << "link = "; if (!(getLink() == ArrayAttr())) { odsPrinter.printStrippedAttrOrType(getLink()); } } if (!(getVerifyTarget() == true)) { if (!_firstPrinted) odsPrinter << ", "; _firstPrinted = false; odsPrinter << "verifyTarget = "; if (!(getVerifyTarget() == true)) { odsPrinter.printStrippedAttrOrType(getVerifyTarget()); } } } odsPrinter << ">"; } else { } } int NVVMTargetAttr::getO() const { return getImpl()->O; } ::llvm::StringRef NVVMTargetAttr::getTriple() const { return getImpl()->triple; } ::llvm::StringRef NVVMTargetAttr::getChip() const { return getImpl()->chip; } ::llvm::StringRef NVVMTargetAttr::getFeatures() const { return getImpl()->features; } DictionaryAttr NVVMTargetAttr::getFlags() const { return getImpl()->flags; } ArrayAttr NVVMTargetAttr::getLink() const { return getImpl()->link; } bool NVVMTargetAttr::getVerifyTarget() const { return getImpl()->verifyTarget; } } // namespace mlir::NVVM MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::NVVM::NVVMTargetAttr) namespace mlir::NVVM { /// Parse an attribute registered to this dialect. ::mlir::Attribute NVVMDialect::parseAttribute(::mlir::DialectAsmParser &parser, ::mlir::Type type) const { ::llvm::SMLoc typeLoc = parser.getCurrentLocation(); ::llvm::StringRef attrTag; { ::mlir::Attribute attr; auto parseResult = generatedAttributeParser(parser, &attrTag, type, attr); if (parseResult.has_value()) return attr; } parser.emitError(typeLoc) << "unknown attribute `" << attrTag << "` in dialect `" << getNamespace() << "`"; return {}; } /// Print an attribute registered to this dialect. void NVVMDialect::printAttribute(::mlir::Attribute attr, ::mlir::DialectAsmPrinter &printer) const { if (::mlir::succeeded(generatedAttributePrinter(attr, printer))) return; } } // namespace mlir::NVVM #endif // GET_ATTRDEF_CLASSES