8 #ifndef MLIR_DIALECT_AMDGPU_UTILS_CHIPSET_H_
9 #define MLIR_DIALECT_AMDGPU_UTILS_CHIPSET_H_
28 constexpr
Chipset(
unsigned major,
unsigned minor,
unsigned stepping)
33 static FailureOr<Chipset>
parse(StringRef name);
35 std::tuple<unsigned, unsigned, unsigned>
asTuple()
const {
39 #define DEFINE_COMP_OPERATOR(OPERATOR) \
40 friend bool operator OPERATOR(const Chipset &lhs, const Chipset &rhs) { \
41 return lhs.asTuple() OPERATOR rhs.asTuple(); \
49 #undef DEFINE_COMP_OPERATOR
#define DEFINE_COMP_OPERATOR(OPERATOR)
Represents the amdgpu gfx chipset version, e.g., gfx90a, gfx942, gfx1103.
constexpr Chipset(unsigned major, unsigned minor, unsigned stepping)
static FailureOr< Chipset > parse(StringRef name)
Parses the chipset version string and returns the chipset on success, and failure otherwise.
std::tuple< unsigned, unsigned, unsigned > asTuple() const
constexpr Chipset()=default