8#ifndef MLIR_DIALECT_AMDGPU_UTILS_CHIPSET_H_
9#define MLIR_DIALECT_AMDGPU_UTILS_CHIPSET_H_
12#include "llvm/Support/Compiler.h"
32 constexpr Chipset(
unsigned major,
unsigned minor,
unsigned stepping)
40 "use ROCDL::TargetInfo::get instead")
41 static FailureOr<
Chipset> parse(StringRef name);
43 std::tuple<
unsigned,
unsigned,
unsigned>
asTuple()
const {
47#define DEFINE_COMP_OPERATOR(OPERATOR) \
48 friend bool operator OPERATOR(const Chipset &lhs, const Chipset &rhs) { \
49 return lhs.asTuple() OPERATOR rhs.asTuple(); \
57#undef DEFINE_COMP_OPERATOR
64 "Chipset is deperecated",
65 "test FEAT_OCP_FP8_CONVERSION_INSTS on a ROCDL::TargetInfo")
66inline
bool hasOcpFp8(const
Chipset &chipset) {
67 return (chipset.majorVersion == 9 && chipset.minorVersion >= 5) ||
68 chipset.majorVersion >= 12;
#define DEFINE_COMP_OPERATOR(OPERATOR)
LLVM_DEPRECATED_WITH_FIXIT("Chipset is deperecated", "test FEAT_OCP_FP8_CONVERSION_INSTS on a ROCDL::TargetInfo") inline bool hasOcpFp8(const Chipset &chipset)
Represents the amdgpu gfx chipset version, e.g., gfx90a, gfx942, gfx1103.
constexpr Chipset(unsigned major, unsigned minor, unsigned stepping)
std::tuple< unsigned, unsigned, unsigned > asTuple() const
LLVM_DEPRECATED_WITH_FIXIT("Chipset struct deprecated", "use ROCDL::TargetInfo::get instead") static FailureOr< Chipset > parse(StringRef name)
Parses the chipset version string and returns the chipset on success, and failure otherwise.
constexpr Chipset()=default