My Project
Public Member Functions | Static Public Member Functions | List of all members
mlir::gpu::GPUDialect Class Reference

#include <GPUDialect.h>

Inheritance diagram for mlir::gpu::GPUDialect:
Inheritance graph
[legend]
Collaboration diagram for mlir::gpu::GPUDialect:
Collaboration graph
[legend]

Public Member Functions

 GPUDialect (MLIRContext *context)
 Create the dialect in the given context. More...
 
LogicalResult verifyOperationAttribute (Operation *op, NamedAttribute attr) override
 
- Public Member Functions inherited from mlir::Dialect
virtual ~Dialect ()
 
MLIRContextgetContext () const
 
StringRef getNamespace () const
 
bool allowsUnknownOperations () const
 
bool allowsUnknownTypes () const
 
virtual OperationmaterializeConstant (OpBuilder &builder, Attribute value, Type type, Location loc)
 
virtual Attribute parseAttribute (DialectAsmParser &parser, Type type) const
 Parse an attribute registered to this dialect. More...
 
virtual void printAttribute (Attribute, DialectAsmPrinter &) const
 
virtual Type parseType (DialectAsmParser &parser) const
 Parse a type registered to this dialect. More...
 
virtual void printType (Type, DialectAsmPrinter &) const
 Print a type registered to this dialect. More...
 
virtual LogicalResult verifyRegionArgAttribute (Operation *, unsigned regionIndex, unsigned argIndex, NamedAttribute)
 
virtual LogicalResult verifyRegionResultAttribute (Operation *, unsigned regionIndex, unsigned resultIndex, NamedAttribute)
 
const DialectInterfacegetRegisteredInterface (ClassID *interfaceID)
 
template<typename InterfaceT >
const InterfaceT * getRegisteredInterface ()
 

Static Public Member Functions

static StringRef getDialectNamespace ()
 Get dialect namespace. More...
 
static StringRef getContainerModuleAttrName ()
 
static StringRef getDialectName ()
 Get the canonical string name of the dialect. More...
 
static StringRef getKernelFuncAttrName ()
 Get the name of the attribute used to annotate external kernel functions. More...
 
static StringRef getKernelModuleAttrName ()
 Get the name of the attribute used to annotate kernel modules. More...
 
static bool isKernel (Operation *op)
 
static unsigned getNumWorkgroupDimensions ()
 
static unsigned getWorkgroupAddressSpace ()
 
static unsigned getPrivateAddressSpace ()
 
- Static Public Member Functions inherited from mlir::Dialect
static bool isValidNamespace (StringRef str)
 

Additional Inherited Members

- Public Attributes inherited from mlir::Dialect
DialectConstantFoldHook constantFoldHook
 
DialectConstantDecodeHook decodeHook
 
DialectExtractElementHook extractElementHook
 
- Protected Member Functions inherited from mlir::Dialect
 Dialect (StringRef name, MLIRContext *context)
 
template<typename... Args>
void addOperations ()
 
void addOperation (AbstractOperation opInfo)
 
template<typename... Args>
void addTypes ()
 This method is used by derived classes to add their types to the set. More...
 
template<typename... Args>
void addAttributes ()
 This method is used by derived classes to add their attributes to the set. More...
 
void allowUnknownOperations (bool allow=true)
 Enable support for unregistered operations. More...
 
void allowUnknownTypes (bool allow=true)
 Enable support for unregistered types. More...
 
void addInterface (std::unique_ptr< DialectInterface > interface)
 Register a dialect interface with this dialect instance. More...
 
template<typename T , typename T2 , typename... Tys>
void addInterfaces ()
 Register a set of dialect interfaces with this dialect instance. More...
 
template<typename T >
void addInterfaces ()
 

Detailed Description

The dialect containing GPU kernel launching operations and related facilities.

Constructor & Destructor Documentation

◆ GPUDialect()

GPUDialect::GPUDialect ( MLIRContext context)
explicit

Create the dialect in the given context.

Member Function Documentation

◆ getContainerModuleAttrName()

static StringRef mlir::gpu::GPUDialect::getContainerModuleAttrName ( )
inlinestatic

Get the name of the attribute used to annotate the modules that contain kernel modules.

◆ getDialectName()

StringRef GPUDialect::getDialectName ( )
static

Get the canonical string name of the dialect.

◆ getDialectNamespace()

static StringRef mlir::gpu::GPUDialect::getDialectNamespace ( )
inlinestatic

Get dialect namespace.

◆ getKernelFuncAttrName()

static StringRef mlir::gpu::GPUDialect::getKernelFuncAttrName ( )
inlinestatic

Get the name of the attribute used to annotate external kernel functions.

◆ getKernelModuleAttrName()

static StringRef mlir::gpu::GPUDialect::getKernelModuleAttrName ( )
inlinestatic

Get the name of the attribute used to annotate kernel modules.

◆ getNumWorkgroupDimensions()

static unsigned mlir::gpu::GPUDialect::getNumWorkgroupDimensions ( )
inlinestatic

Returns the number of workgroup (thread, block) dimensions supported in the GPU dialect.

◆ getPrivateAddressSpace()

static unsigned mlir::gpu::GPUDialect::getPrivateAddressSpace ( )
inlinestatic

Returns the numeric value used to identify the private memory address space.

◆ getWorkgroupAddressSpace()

static unsigned mlir::gpu::GPUDialect::getWorkgroupAddressSpace ( )
inlinestatic

Returns the numeric value used to identify the workgroup memory address space.

◆ isKernel()

bool GPUDialect::isKernel ( Operation op)
static

Returns whether the given function is a kernel function, i.e., has the 'gpu.kernel' attribute.

◆ verifyOperationAttribute()

LogicalResult GPUDialect::verifyOperationAttribute ( Operation ,
NamedAttribute   
)
overridevirtual

Verify an attribute from this dialect on the given operation. Returns failure if the verification failed, success otherwise.

Reimplemented from mlir::Dialect.


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