|
MLIR 23.0.0git
|
Namespaces | |
| namespace | impl |
Classes | |
| struct | DeclareTargetDefaultModel |
| struct | DeviceTypeClauseOps |
| struct | OffloadModuleDefaultModel |
| struct | OffloadModuleOpts |
Typedefs | |
| using | HostEvaluatedOperands |
| Clauses that correspond to operations other than omp.target, but might have to be evaluated outside of a parent target region. | |
| using | DeclareTargetOperands = detail::Clauses<DeviceTypeClauseOps> |
| using | TargetEnterExitUpdateDataOperands = TargetEnterDataOperands |
| omp.target_enter_data, omp.target_exit_data and omp.target_update take the same clauses, so we give the structure to be shared by all of them a representative name. | |
Functions | |
| std::tuple< NewCliOp, OpOperand *, OpOperand * > | decodeCli (mlir::Value cli) |
| Find the omp.new_cli, generator, and consumer of a canonical loop info. | |
| static void | setOffloadModuleInterfaceAttributes (ModuleOp module, OffloadModuleOpts opts) |
| Sets OpenMP offload module interface attributes on a ModuleOp, shared between Flang and Clang (CIR) frontends. | |
| static void | setOpenMPVersionAttribute (ModuleOp module, int64_t version) |
| static int64_t | getOpenMPVersionAttribute (ModuleOp module, int64_t fallback=-1) |
| std::unique_ptr<::mlir::Pass > | createMarkDeclareTargetPass () |
| std::unique_ptr<::mlir::Pass > | createPrepareForOMPOffloadPrivatizationPass () |
| std::unique_ptr<::mlir::Pass > | createStackToSharedPass () |
| void | registerMarkDeclareTargetPass () |
| void | registerMarkDeclareTargetPassPass () |
| void | registerPrepareForOMPOffloadPrivatizationPass () |
| void | registerPrepareForOMPOffloadPrivatizationPassPass () |
| void | registerStackToSharedPass () |
| void | registerStackToSharedPassPass () |
| void | registerOpenMPPasses () |
| bool | allocaUsesRequireSharedMem (Value alloc) |
| Check whether the value representing an allocation, assumed to have been defined in a shared device context, is used in a manner that would require device shared memory for correctness. | |
| bool | opInSharedDeviceContext (Operation &op) |
| Check whether the given operation is located in a context where an allocation to be used by multiple threads in a parallel region would have to be placed in device shared memory to be accessible. | |
| using mlir::omp::DeclareTargetOperands = detail::Clauses<DeviceTypeClauseOps> |
Definition at line 47 of file OpenMPClauseOperands.h.
Clauses that correspond to operations other than omp.target, but might have to be evaluated outside of a parent target region.
Definition at line 42 of file OpenMPClauseOperands.h.
| using mlir::omp::TargetEnterExitUpdateDataOperands = TargetEnterDataOperands |
omp.target_enter_data, omp.target_exit_data and omp.target_update take the same clauses, so we give the structure to be shared by all of them a representative name.
Definition at line 52 of file OpenMPClauseOperands.h.
Check whether the value representing an allocation, assumed to have been defined in a shared device context, is used in a manner that would require device shared memory for correctness.
When a use takes place inside an omp.parallel region and it's not as a private clause argument, or when it is a reduction argument passed to omp.parallel or a function call argument, then the defining allocation is eligible for replacement with shared memory.
Definition at line 51 of file Utils.cpp.
References allocaUseRequiresSharedMem(), mlir::Operation::getResults(), mlir::Value::getUses(), and result.
Referenced by allocatePrivateVars(), cleanupPrivateVars(), and createDeviceArgumentAccessor().
| std::unique_ptr<::mlir::Pass > mlir::omp::createMarkDeclareTargetPass | ( | ) |
We declare an explicit private instantiation because Pass classes should only be visible by the current library.
Definition at line 81 of file MarkDeclareTarget.cpp.
| std::unique_ptr<::mlir::Pass > mlir::omp::createPrepareForOMPOffloadPrivatizationPass | ( | ) |
We declare an explicit private instantiation because Pass classes should only be visible by the current library.
Definition at line 156 of file OpenMPOffloadPrivatizationPrepare.cpp.
References mlir::Operation::user_begin(), and mlir::Operation::user_end().
| std::unique_ptr<::mlir::Pass > mlir::omp::createStackToSharedPass | ( | ) |
We declare an explicit private instantiation because Pass classes should only be visible by the current library.
Definition at line 231 of file StackToShared.cpp.
| std::tuple< NewCliOp, OpOperand *, OpOperand * > mlir::omp::decodeCli | ( | mlir::Value | cli | ) |
Find the omp.new_cli, generator, and consumer of a canonical loop info.
Definition at line 3844 of file OpenMPDialect.cpp.
References mlir::Value::getContext(), mlir::Value::getDefiningOp(), mlir::Value::getType(), and mlir::Value::getUses().
Referenced by checkApplyeesNesting().
Definition at line 97 of file OpenMPOffloadUtils.h.
Check whether the given operation is located in a context where an allocation to be used by multiple threads in a parallel region would have to be placed in device shared memory to be accessible.
That means that it is inside of a target device module, it is a non-SPMD target region, is inside of one or it's located in a device function, and it is not not inside of a parallel region.
This represents a necessary but not sufficient set of conditions to use device shared memory in place of regular allocas. For some variables, the associated OpenMP construct or their uses might also need to be taken into account.
Definition at line 66 of file Utils.cpp.
References mlir::Operation::getParentOfType().
Referenced by allocatePrivateVars(), allocReductionVars(), cleanupPrivateVars(), createDeviceArgumentAccessor(), createReductionsAndCleanup(), and shouldReplaceAllocaWithDeviceSharedMem().
|
inline |
|
inline |
Definition at line 311 of file Passes.h.
Referenced by mlir::registerAllPasses().
|
inline |
|
inline |
|
static |
Sets OpenMP offload module interface attributes on a ModuleOp, shared between Flang and Clang (CIR) frontends.
Definition at line 66 of file OpenMPOffloadUtils.h.
References mlir::omp::OffloadModuleOpts::NoGPULib, mlir::omp::OffloadModuleOpts::OMPHostIRFile, mlir::omp::OffloadModuleOpts::OMPTargetTriples, mlir::omp::OffloadModuleOpts::OpenMPForceUSM, mlir::omp::OffloadModuleOpts::OpenMPIsGPU, mlir::omp::OffloadModuleOpts::OpenMPIsTargetDevice, mlir::omp::OffloadModuleOpts::OpenMPNoNestedParallelism, mlir::omp::OffloadModuleOpts::OpenMPNoThreadState, mlir::omp::OffloadModuleOpts::OpenMPTargetDebug, mlir::omp::OffloadModuleOpts::OpenMPTeamSubscription, mlir::omp::OffloadModuleOpts::OpenMPThreadSubscription, and mlir::omp::OffloadModuleOpts::OpenMPVersion.
Definition at line 89 of file OpenMPOffloadUtils.h.