FLANG
cuf Namespace Reference

Functions

mlir::gpu::GPUModuleOp getOrCreateGPUModule (mlir::ModuleOp mod, mlir::SymbolTable &symTab)
 Retrieve or create the CUDA Fortran GPU module in the given mod.
bool isCUDADeviceContext (mlir::Operation *op)
bool isCUDADeviceContext (mlir::Region &, bool isDoConcurrentOffloadEnabled=false)
bool isRegisteredDeviceGlobal (fir::GlobalOp op)
bool isRegisteredDeviceAttr (std::optional< cuf::DataAttribute > attr)
void genPointerSync (const mlir::Value box, fir::FirOpBuilder &builder)
cuf::DataAttributeAttr getDataAttribute (mlir::MLIRContext *mlirContext, std::optional< Fortran::common::CUDADataAttr > cudaAttr)
cuf::ProcAttributeAttr getProcAttribute (mlir::MLIRContext *mlirContext, std::optional< Fortran::common::CUDASubprogramAttrs > cudaAttr)
cuf::DataAttributeAttr getDataAttr (mlir::Operation *op)
 Returns the data attribute if the operation has one.
bool hasDataAttr (mlir::Operation *op, cuf::DataAttribute value)
 Returns true if the operation has a data attribute with the given value.
void registerCUFDialectTranslation (mlir::DialectRegistry &registry)
void populateCUFGPUToLLVMConversionPatterns (fir::LLVMTypeConverter &converter, mlir::RewritePatternSet &patterns, mlir::PatternBenefit benefit=1)
void populateCUFToFIRConversionPatterns (const fir::LLVMTypeConverter &converter, mlir::DataLayout &dl, const mlir::SymbolTable &symtab, mlir::RewritePatternSet &patterns)
 Patterns that convert CUF operations to runtime calls.
void populateFIRCUFConversionPatterns (const mlir::SymbolTable &symtab, mlir::RewritePatternSet &patterns)
 Patterns that updates fir operations in presence of CUF.

Detailed Description

Instantiation of pft::Variable in FIR/MLIR.

Function Documentation

◆ getOrCreateGPUModule()

mlir::gpu::GPUModuleOp cuf::getOrCreateGPUModule ( mlir::ModuleOp mod,
mlir::SymbolTable & symTab )

Retrieve or create the CUDA Fortran GPU module in the given mod.

Retrieve or create the CUDA Fortran GPU module in the give in mod.

◆ registerCUFDialectTranslation()

void cuf::registerCUFDialectTranslation ( mlir::DialectRegistry & registry)

Register the CUF dialect and the translation from it to the LLVM IR in the given registry.