495 lines
20 KiB
C++
495 lines
20 KiB
C++
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|
|
|* *|
|
|
|* AttrDef Declarations *|
|
|
|* *|
|
|
|* Automatically generated file, do not edit! *|
|
|
|* *|
|
|
\*===----------------------------------------------------------------------===*/
|
|
|
|
#ifdef GET_ATTRDEF_CLASSES
|
|
#undef GET_ATTRDEF_CLASSES
|
|
|
|
|
|
namespace mlir {
|
|
class AsmParser;
|
|
class AsmPrinter;
|
|
} // namespace mlir
|
|
namespace mlir::ROCDL {
|
|
|
|
/// ROCDL buffer out-of-bounds mode
|
|
/// Specifies the AMDGPU buffer out-of-bounds mode encoded in
|
|
/// `amdgpu.buffer.oob.mode` or `amdgpu.tbuffer.oob.mode` LLVM module flags.
|
|
class BufferOOBModeAttr;
|
|
/// ROCDL buffer/tbuffer out-of-bounds mode LLVM module flag
|
|
/// Specifies an AMDGPU buffer or tbuffer out-of-bounds mode LLVM module flag.
|
|
/// The attribute supplies the required `max` merge behavior and AMDGPU module
|
|
/// flag key. Prefer these typed attributes over hand-written generic
|
|
/// `#llvm.mlir.module_flag` triples for AMDGPU OOB mode keys when MLIR-side
|
|
/// behavior and enum validation are required.
|
|
class BufferOOBModeModuleFlagAttr;
|
|
/// ROCDL buffer/tbuffer out-of-bounds mode LLVM module flag
|
|
/// Specifies an AMDGPU buffer or tbuffer out-of-bounds mode LLVM module flag.
|
|
/// The attribute supplies the required `max` merge behavior and AMDGPU module
|
|
/// flag key. Prefer these typed attributes over hand-written generic
|
|
/// `#llvm.mlir.module_flag` triples for AMDGPU OOB mode keys when MLIR-side
|
|
/// behavior and enum validation are required.
|
|
class TBufferOOBModeModuleFlagAttr;
|
|
/// permutations of the lanes storing B in an MFMA
|
|
/// Enum cases:
|
|
/// * none (`none`)
|
|
/// * bcast_first_32 (`bcast_first_32`)
|
|
/// * bcast_second_32 (`bcast_second_32`)
|
|
/// * rotate_16_right (`rotate_16_right`)
|
|
/// * bcast_first_16 (`bcast_first_16`)
|
|
/// * bcast_second_16 (`bcast_second_16`)
|
|
/// * bcast_third_16 (`bcast_third_16`)
|
|
/// * bcast_fourth_16 (`bcast_fourth_16`)
|
|
class MFMAPermBAttr;
|
|
/// negation modifier bitfield for gfx94x double-precision MFMA
|
|
/// Enum cases:
|
|
/// * none (`none`)
|
|
/// * neg_a (`neg_a`)
|
|
/// * neg_b (`neg_b`)
|
|
/// * neg_c (`neg_c`)
|
|
class MFMANegModifierAttr;
|
|
/// matrix operand formats selected by scaled MFMA/WMMA format fields
|
|
/// Enum cases:
|
|
/// * fp8_e4m3 (`fp8_e4m3`)
|
|
/// * fp8_e5m2 (`fp8_e5m2`)
|
|
/// * fp6_e2m3 (`fp6_e2m3`)
|
|
/// * fp6_e3m2 (`fp6_e3m2`)
|
|
/// * fp4_e2m1 (`fp4_e2m1`)
|
|
class MatrixFormatAttr;
|
|
/// matrix scale row selector
|
|
/// Enum cases:
|
|
/// * row0 (`row0`)
|
|
/// * row1 (`row1`)
|
|
class WMMAMatrixScaleAttr;
|
|
/// matrix scale exponent formats
|
|
/// Enum cases:
|
|
/// * e8 (`e8`)
|
|
/// * e5m3 (`e5m3`)
|
|
/// * e4m3 (`e4m3`)
|
|
class WMMAMatrixScaleFormatAttr;
|
|
/// WMMA C operand modifiers
|
|
/// Enum cases:
|
|
/// * none (`none`)
|
|
/// * neg (`neg`)
|
|
/// * abs (`abs`)
|
|
/// * neg_abs (`neg_abs`)
|
|
class WMMACModifierAttr;
|
|
/// instruction type mask for scheduling barriers
|
|
/// Enum cases:
|
|
/// * none (`none`)
|
|
/// * non_mem_non_sideeffect (`non_mem_non_sideeffect`)
|
|
/// * valu (`valu`)
|
|
/// * salu (`salu`)
|
|
/// * mfma_wmma (`mfma_wmma`)
|
|
/// * all_vmem (`all_vmem`)
|
|
/// * vmem_read (`vmem_read`)
|
|
/// * vmem_write (`vmem_write`)
|
|
/// * all_ds (`all_ds`)
|
|
/// * ds_read (`ds_read`)
|
|
/// * ds_write (`ds_write`)
|
|
/// * transcendental (`transcendental`)
|
|
/// * ldsdma (`ldsdma`)
|
|
/// * all (`all`)
|
|
class SchedGroupMaskAttr;
|
|
/// pre-gfx12 buffer cache policy bits
|
|
/// Enum cases:
|
|
/// * none (`none`)
|
|
/// * glc (`glc`)
|
|
/// * slc (`slc`)
|
|
/// * dlc (`dlc`)
|
|
/// * swz (`swz`)
|
|
/// * scc (`scc`)
|
|
/// * all (`all`)
|
|
/// * volatile (`volatile_op`)
|
|
class PreGfx12CachePolicyAttr;
|
|
/// gfx942 buffer cache policy bits
|
|
/// Enum cases:
|
|
/// * none (`none`)
|
|
/// * sc0 (`sc0`)
|
|
/// * nt (`nt`)
|
|
/// * swz (`swz`)
|
|
/// * sc1 (`sc1`)
|
|
/// * volatile (`volatile_op`)
|
|
class Gfx942CachePolicyAttr;
|
|
/// gfx12 cache policy bits
|
|
/// Enum cases:
|
|
/// * none (`none`)
|
|
/// * nt (`nt`)
|
|
/// * ht (`ht`)
|
|
/// * lu (`lu`)
|
|
/// * nt_rt (`nt_rt`)
|
|
/// * rt_nt (`rt_nt`)
|
|
/// * nt_ht (`nt_ht`)
|
|
/// * nt_wb (`nt_wb`)
|
|
/// * scope_se (`scope_se`)
|
|
/// * scope_dev (`scope_dev`)
|
|
/// * scope_sys (`scope_sys`)
|
|
/// * nv (`nv`)
|
|
/// * swz (`swz`)
|
|
/// * scal (`scal`)
|
|
/// * volatile (`volatile_op`)
|
|
class Gfx12CachePolicyAttr;
|
|
/// gfx12 atomic cache policy bits
|
|
/// Enum cases:
|
|
/// * none (`none`)
|
|
/// * return (`keep_return`)
|
|
/// * nt (`nt`)
|
|
/// * cascade (`cascade`)
|
|
/// * scope_se (`scope_se`)
|
|
/// * scope_dev (`scope_dev`)
|
|
/// * scope_sys (`scope_sys`)
|
|
/// * nv (`nv`)
|
|
/// * volatile (`volatile_op`)
|
|
class Gfx12AtomicCachePolicyAttr;
|
|
/// ROCDL target attribute for controlling compilation of AMDGPU targets. All
|
|
/// parameters decay into default values if not present.
|
|
///
|
|
/// Examples:
|
|
///
|
|
/// 1. Target with default values.
|
|
/// ```
|
|
/// gpu.module @mymodule [#rocdl.target] attributes {...} {
|
|
/// ...
|
|
/// }
|
|
/// ```
|
|
///
|
|
/// 2. Target with `gfx90a` chip and fast math.
|
|
/// ```
|
|
/// gpu.module @mymodule [#rocdl.target<chip = "gfx90a", flags = {fast, no_wave64}>] {
|
|
/// ...
|
|
/// }
|
|
/// ```
|
|
class ROCDLTargetAttr;
|
|
namespace detail {
|
|
|
|
struct BufferOOBModeAttrStorage;
|
|
|
|
} // namespace detail
|
|
class BufferOOBModeAttr : public ::mlir::Attribute::AttrBase<BufferOOBModeAttr, ::mlir::Attribute, detail::BufferOOBModeAttrStorage, ::mlir::LLVM::IntrinsicIntegerAttrInterface::Trait> {
|
|
public:
|
|
using Base::Base;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.buffer_oob_mode";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
static BufferOOBModeAttr get(::mlir::MLIRContext *context, ::mlir::ROCDL::BufferOOBMode value);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"buffer_oob_mode"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
::mlir::ROCDL::BufferOOBMode getValue() const;
|
|
};
|
|
namespace detail {
|
|
|
|
struct BufferOOBModeModuleFlagAttrStorage;
|
|
|
|
} // namespace detail
|
|
class BufferOOBModeModuleFlagAttr : public ::mlir::Attribute::AttrBase<BufferOOBModeModuleFlagAttr, ::mlir::Attribute, detail::BufferOOBModeModuleFlagAttrStorage, ::mlir::LLVM::ModuleFlagAttrInterface::Trait> {
|
|
public:
|
|
using Base::Base;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.buffer_oob_mode_flag";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
static BufferOOBModeModuleFlagAttr get(::mlir::MLIRContext *context, ::mlir::ROCDL::BufferOOBMode value);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"buffer_oob_mode_flag"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
::mlir::ROCDL::BufferOOBMode getValue() const;
|
|
::mlir::LLVM::ModFlagBehavior getModuleFlagBehavior() const;
|
|
::mlir::StringAttr getModuleFlagKey() const;
|
|
::mlir::Attribute getModuleFlagValue() const;
|
|
};
|
|
namespace detail {
|
|
|
|
struct TBufferOOBModeModuleFlagAttrStorage;
|
|
|
|
} // namespace detail
|
|
class TBufferOOBModeModuleFlagAttr : public ::mlir::Attribute::AttrBase<TBufferOOBModeModuleFlagAttr, ::mlir::Attribute, detail::TBufferOOBModeModuleFlagAttrStorage, ::mlir::LLVM::ModuleFlagAttrInterface::Trait> {
|
|
public:
|
|
using Base::Base;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.tbuffer_oob_mode_flag";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
static TBufferOOBModeModuleFlagAttr get(::mlir::MLIRContext *context, ::mlir::ROCDL::BufferOOBMode value);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"tbuffer_oob_mode_flag"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
::mlir::ROCDL::BufferOOBMode getValue() const;
|
|
::mlir::LLVM::ModFlagBehavior getModuleFlagBehavior() const;
|
|
::mlir::StringAttr getModuleFlagKey() const;
|
|
::mlir::Attribute getModuleFlagValue() const;
|
|
};
|
|
namespace detail {
|
|
|
|
struct MFMAPermBAttrStorage;
|
|
|
|
} // namespace detail
|
|
class MFMAPermBAttr : public ::mlir::Attribute::AttrBase<MFMAPermBAttr, ::mlir::Attribute, detail::MFMAPermBAttrStorage, ::mlir::LLVM::IntrinsicIntegerAttrInterface::Trait> {
|
|
public:
|
|
using Base::Base;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.mfma_perm_b";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
static MFMAPermBAttr get(::mlir::MLIRContext *context, ::mlir::ROCDL::MFMAPermB value);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"mfma_perm_b"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
::mlir::ROCDL::MFMAPermB getValue() const;
|
|
};
|
|
namespace detail {
|
|
|
|
struct MFMANegModifierAttrStorage;
|
|
|
|
} // namespace detail
|
|
class MFMANegModifierAttr : public ::mlir::Attribute::AttrBase<MFMANegModifierAttr, ::mlir::Attribute, detail::MFMANegModifierAttrStorage, ::mlir::LLVM::IntrinsicIntegerAttrInterface::Trait> {
|
|
public:
|
|
using Base::Base;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.mfma_neg_modifier";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
static MFMANegModifierAttr get(::mlir::MLIRContext *context, ::mlir::ROCDL::MFMANegModifier value);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"mfma_neg_modifier"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
::mlir::ROCDL::MFMANegModifier getValue() const;
|
|
};
|
|
namespace detail {
|
|
|
|
struct MatrixFormatAttrStorage;
|
|
|
|
} // namespace detail
|
|
class MatrixFormatAttr : public ::mlir::Attribute::AttrBase<MatrixFormatAttr, ::mlir::Attribute, detail::MatrixFormatAttrStorage, ::mlir::LLVM::IntrinsicIntegerAttrInterface::Trait> {
|
|
public:
|
|
using Base::Base;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.matrix_format";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
static MatrixFormatAttr get(::mlir::MLIRContext *context, ::mlir::ROCDL::MatrixFormat value);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"matrix_format"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
::mlir::ROCDL::MatrixFormat getValue() const;
|
|
};
|
|
namespace detail {
|
|
|
|
struct WMMAMatrixScaleAttrStorage;
|
|
|
|
} // namespace detail
|
|
class WMMAMatrixScaleAttr : public ::mlir::Attribute::AttrBase<WMMAMatrixScaleAttr, ::mlir::Attribute, detail::WMMAMatrixScaleAttrStorage, ::mlir::LLVM::IntrinsicIntegerAttrInterface::Trait> {
|
|
public:
|
|
using Base::Base;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.wmma_matrix_scale";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
static WMMAMatrixScaleAttr get(::mlir::MLIRContext *context, ::mlir::ROCDL::WMMAMatrixScale value);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"wmma_matrix_scale"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
::mlir::ROCDL::WMMAMatrixScale getValue() const;
|
|
};
|
|
namespace detail {
|
|
|
|
struct WMMAMatrixScaleFormatAttrStorage;
|
|
|
|
} // namespace detail
|
|
class WMMAMatrixScaleFormatAttr : public ::mlir::Attribute::AttrBase<WMMAMatrixScaleFormatAttr, ::mlir::Attribute, detail::WMMAMatrixScaleFormatAttrStorage, ::mlir::LLVM::IntrinsicIntegerAttrInterface::Trait> {
|
|
public:
|
|
using Base::Base;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.wmma_matrix_scale_format";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
static WMMAMatrixScaleFormatAttr get(::mlir::MLIRContext *context, ::mlir::ROCDL::WMMAMatrixScaleFormat value);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"wmma_matrix_scale_format"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
::mlir::ROCDL::WMMAMatrixScaleFormat getValue() const;
|
|
};
|
|
namespace detail {
|
|
|
|
struct WMMACModifierAttrStorage;
|
|
|
|
} // namespace detail
|
|
class WMMACModifierAttr : public ::mlir::Attribute::AttrBase<WMMACModifierAttr, ::mlir::Attribute, detail::WMMACModifierAttrStorage, ::mlir::LLVM::IntrinsicIntegerAttrInterface::Trait> {
|
|
public:
|
|
using Base::Base;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.wmma_c_modifier";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
static WMMACModifierAttr get(::mlir::MLIRContext *context, ::mlir::ROCDL::WMMACModifier value);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"wmma_c_modifier"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
::mlir::ROCDL::WMMACModifier getValue() const;
|
|
};
|
|
namespace detail {
|
|
|
|
struct SchedGroupMaskAttrStorage;
|
|
|
|
} // namespace detail
|
|
class SchedGroupMaskAttr : public ::mlir::Attribute::AttrBase<SchedGroupMaskAttr, ::mlir::Attribute, detail::SchedGroupMaskAttrStorage, ::mlir::LLVM::IntrinsicIntegerAttrInterface::Trait> {
|
|
public:
|
|
using Base::Base;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.sched_group_mask";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
static SchedGroupMaskAttr get(::mlir::MLIRContext *context, ::mlir::ROCDL::SchedGroupMask value);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"sched_group_mask"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
::mlir::ROCDL::SchedGroupMask getValue() const;
|
|
};
|
|
namespace detail {
|
|
|
|
struct PreGfx12CachePolicyAttrStorage;
|
|
|
|
} // namespace detail
|
|
class PreGfx12CachePolicyAttr : public ::mlir::Attribute::AttrBase<PreGfx12CachePolicyAttr, ::mlir::Attribute, detail::PreGfx12CachePolicyAttrStorage, ::mlir::LLVM::IntrinsicIntegerAttrInterface::Trait> {
|
|
public:
|
|
using Base::Base;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.pre_gfx12_cache_policy";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
static PreGfx12CachePolicyAttr get(::mlir::MLIRContext *context, ::mlir::ROCDL::PreGfx12CachePolicy value);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"pre_gfx12_cache_policy"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
::mlir::ROCDL::PreGfx12CachePolicy getValue() const;
|
|
};
|
|
namespace detail {
|
|
|
|
struct Gfx942CachePolicyAttrStorage;
|
|
|
|
} // namespace detail
|
|
class Gfx942CachePolicyAttr : public ::mlir::Attribute::AttrBase<Gfx942CachePolicyAttr, ::mlir::Attribute, detail::Gfx942CachePolicyAttrStorage, ::mlir::LLVM::IntrinsicIntegerAttrInterface::Trait> {
|
|
public:
|
|
using Base::Base;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.gfx942_cache_policy";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
static Gfx942CachePolicyAttr get(::mlir::MLIRContext *context, ::mlir::ROCDL::Gfx942CachePolicy value);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"gfx942_cache_policy"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
::mlir::ROCDL::Gfx942CachePolicy getValue() const;
|
|
};
|
|
namespace detail {
|
|
|
|
struct Gfx12CachePolicyAttrStorage;
|
|
|
|
} // namespace detail
|
|
class Gfx12CachePolicyAttr : public ::mlir::Attribute::AttrBase<Gfx12CachePolicyAttr, ::mlir::Attribute, detail::Gfx12CachePolicyAttrStorage, ::mlir::LLVM::IntrinsicIntegerAttrInterface::Trait> {
|
|
public:
|
|
using Base::Base;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.gfx12_cache_policy";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
static Gfx12CachePolicyAttr get(::mlir::MLIRContext *context, ::mlir::ROCDL::Gfx12CachePolicy value);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"gfx12_cache_policy"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
::mlir::ROCDL::Gfx12CachePolicy getValue() const;
|
|
};
|
|
namespace detail {
|
|
|
|
struct Gfx12AtomicCachePolicyAttrStorage;
|
|
|
|
} // namespace detail
|
|
class Gfx12AtomicCachePolicyAttr : public ::mlir::Attribute::AttrBase<Gfx12AtomicCachePolicyAttr, ::mlir::Attribute, detail::Gfx12AtomicCachePolicyAttrStorage, ::mlir::LLVM::IntrinsicIntegerAttrInterface::Trait> {
|
|
public:
|
|
using Base::Base;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.gfx12_atomic_cache_policy";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
static Gfx12AtomicCachePolicyAttr get(::mlir::MLIRContext *context, ::mlir::ROCDL::Gfx12AtomicCachePolicy value);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"gfx12_atomic_cache_policy"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
::mlir::ROCDL::Gfx12AtomicCachePolicy getValue() const;
|
|
};
|
|
namespace detail {
|
|
|
|
struct ROCDLTargetAttrStorage;
|
|
|
|
} // namespace detail
|
|
class ROCDLTargetAttr : public ::mlir::Attribute::AttrBase<ROCDLTargetAttr, ::mlir::Attribute, detail::ROCDLTargetAttrStorage> {
|
|
public:
|
|
using Base::Base;
|
|
bool hasFlag(StringRef flag) const;
|
|
bool hasWave64() const;
|
|
bool hasFastMath() const;
|
|
bool hasDaz() const;
|
|
bool hasFiniteOnly() const;
|
|
bool hasUnsafeMath() const;
|
|
bool hasCorrectSqrt() const;
|
|
static constexpr ::llvm::StringLiteral name = "rocdl.target";
|
|
static constexpr ::llvm::StringLiteral dialectName = "rocdl";
|
|
using Base::getChecked;
|
|
static ROCDLTargetAttr get(::mlir::MLIRContext *context, int optLevel = 2, StringRef triple = "amdgcn-amd-amdhsa", StringRef chip = "gfx900", StringRef features = "", StringRef abiVersion = "600", DictionaryAttr targetFlags = nullptr, ArrayAttr linkFiles = nullptr);
|
|
static ROCDLTargetAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, int optLevel = 2, StringRef triple = "amdgcn-amd-amdhsa", StringRef chip = "gfx900", StringRef features = "", StringRef abiVersion = "600", DictionaryAttr targetFlags = nullptr, ArrayAttr linkFiles = nullptr);
|
|
static ::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int O, ::llvm::StringRef triple, ::llvm::StringRef chip, ::llvm::StringRef features, ::llvm::StringRef abi, DictionaryAttr flags, ArrayAttr link);
|
|
static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int O, ::llvm::StringRef triple, ::llvm::StringRef chip, ::llvm::StringRef features, ::llvm::StringRef abi, DictionaryAttr flags, ArrayAttr link);
|
|
static constexpr ::llvm::StringLiteral getMnemonic() {
|
|
return {"target"};
|
|
}
|
|
|
|
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
|
|
void print(::mlir::AsmPrinter &odsPrinter) const;
|
|
int getO() const;
|
|
::llvm::StringRef getTriple() const;
|
|
::llvm::StringRef getChip() const;
|
|
::llvm::StringRef getFeatures() const;
|
|
::llvm::StringRef getAbi() const;
|
|
DictionaryAttr getFlags() const;
|
|
ArrayAttr getLink() const;
|
|
};
|
|
|
|
} // namespace mlir::ROCDL
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BufferOOBModeAttr)
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::BufferOOBModeModuleFlagAttr)
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::TBufferOOBModeModuleFlagAttr)
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::MFMAPermBAttr)
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::MFMANegModifierAttr)
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::MatrixFormatAttr)
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::WMMAMatrixScaleAttr)
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::WMMAMatrixScaleFormatAttr)
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::WMMACModifierAttr)
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::SchedGroupMaskAttr)
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::PreGfx12CachePolicyAttr)
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::Gfx942CachePolicyAttr)
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::Gfx12CachePolicyAttr)
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::Gfx12AtomicCachePolicyAttr)
|
|
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::ROCDL::ROCDLTargetAttr)
|
|
|
|
#endif // GET_ATTRDEF_CLASSES
|
|
|