MLIR  20.0.0git
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mlir::amdgpu::Chipset Struct Reference

Represents the amdgpu gfx chipset version, e.g., gfx90a, gfx942, gfx1103. More...

#include "mlir/Dialect/AMDGPU/Utils/Chipset.h"

Public Member Functions

constexpr Chipset ()=default
 
constexpr Chipset (unsigned major, unsigned minor, unsigned stepping)
 
std::tuple< unsigned, unsigned, unsigned > asTuple () const
 

Static Public Member Functions

static FailureOr< Chipsetparse (StringRef name)
 Parses the chipset version string and returns the chipset on success, and failure otherwise. More...
 

Public Attributes

unsigned majorVersion = 0
 
unsigned minorVersion = 0
 
unsigned steppingVersion = 0
 

Detailed Description

Represents the amdgpu gfx chipset version, e.g., gfx90a, gfx942, gfx1103.

Note that the leading digits form a decimal number, while the last two digits for a hexadecimal number. For example: gfx942 --> major = 9, minor = 0x4, stepping = 0x2 gfx90a --> major = 9, minor = 0x0, stepping = 0xa gfx1103 --> major = 10, minor = 0x0, stepping = 0x3

Definition at line 22 of file Chipset.h.

Constructor & Destructor Documentation

◆ Chipset() [1/2]

constexpr mlir::amdgpu::Chipset::Chipset ( )
constexprdefault

Referenced by parse().

◆ Chipset() [2/2]

constexpr mlir::amdgpu::Chipset::Chipset ( unsigned  major,
unsigned  minor,
unsigned  stepping 
)
inlineconstexpr

Definition at line 28 of file Chipset.h.

Member Function Documentation

◆ asTuple()

std::tuple<unsigned, unsigned, unsigned> mlir::amdgpu::Chipset::asTuple ( ) const
inline

Definition at line 35 of file Chipset.h.

References majorVersion, minorVersion, and steppingVersion.

◆ parse()

FailureOr< Chipset > mlir::amdgpu::Chipset::parse ( StringRef  name)
static

Parses the chipset version string and returns the chipset on success, and failure otherwise.

Definition at line 14 of file Chipset.cpp.

References Chipset().

Member Data Documentation

◆ majorVersion

unsigned mlir::amdgpu::Chipset::majorVersion = 0

Definition at line 23 of file Chipset.h.

Referenced by asTuple(), and mlir::amdgpu::populateAmdgpuEmulateAtomicsPatterns().

◆ minorVersion

unsigned mlir::amdgpu::Chipset::minorVersion = 0

Definition at line 24 of file Chipset.h.

Referenced by asTuple().

◆ steppingVersion

unsigned mlir::amdgpu::Chipset::steppingVersion = 0

Definition at line 25 of file Chipset.h.

Referenced by asTuple().


The documentation for this struct was generated from the following files: