|
MLIR 23.0.0git
|
Policy class that defines how OpenACC parallelism levels map to target-specific parallel dimension attributes. More...
#include "mlir/Dialect/OpenACC/OpenACCParMapping.h"
Public Member Functions | |
| virtual | ~ACCParMappingPolicy ()=default |
| virtual ParDimAttrT | map (MLIRContext *ctx, ParLevel level) const =0 |
| Map an OpenACC parallelism level to target dimension. | |
| ParDimAttrT | gangDim (MLIRContext *ctx, ParLevel level) const |
| Convenience methods for specific parallelism levels. | |
| ParDimAttrT | workerDim (MLIRContext *ctx) const |
| ParDimAttrT | vectorDim (MLIRContext *ctx) const |
| ParDimAttrT | seqDim (MLIRContext *ctx) const |
| virtual bool | isVector (ParDimAttrT attr) const =0 |
| Check if the attribute represents vector parallelism. | |
| virtual bool | isWorker (ParDimAttrT attr) const =0 |
| Check if the attribute represents worker parallelism. | |
| virtual bool | isGang (ParDimAttrT attr) const =0 |
| Check if the attribute represents gang parallelism (any gang dimension). | |
| virtual bool | isSeq (ParDimAttrT attr) const =0 |
| Check if the attribute represents sequential execution. | |
Policy class that defines how OpenACC parallelism levels map to target-specific parallel dimension attributes.
Implementations provide the actual mapping.
Template parameter ParDimAttrT specifies the attribute type returned by the mapping functions (e.g., mlir::acc::GPUParallelDimAttr for GPU targets).
This policy allows different mapping strategies:
Pass an implementation to functions that need to perform the mapping.
Definition at line 64 of file OpenACCParMapping.h.
|
virtualdefault |
|
inline |
Convenience methods for specific parallelism levels.
Definition at line 76 of file OpenACCParMapping.h.
|
pure virtual |
Check if the attribute represents gang parallelism (any gang dimension).
Implemented in mlir::acc::DefaultACCToGPUMappingPolicy.
|
pure virtual |
Check if the attribute represents sequential execution.
Implemented in mlir::acc::DefaultACCToGPUMappingPolicy.
|
pure virtual |
Check if the attribute represents vector parallelism.
Implemented in mlir::acc::DefaultACCToGPUMappingPolicy.
|
pure virtual |
Check if the attribute represents worker parallelism.
Implemented in mlir::acc::DefaultACCToGPUMappingPolicy.
|
pure virtual |
Map an OpenACC parallelism level to target dimension.
| ctx | The MLIR context |
| level | The OpenACC parallelism level (gang_dim1, gang_dim2, gang_dim3, worker, vector, or seq) |
Implemented in mlir::acc::DefaultACCToGPUMappingPolicy.
Referenced by mlir::acc::ACCParMappingPolicy< mlir::acc::GPUParallelDimAttr >::gangDim(), mlir::acc::ACCParMappingPolicy< mlir::acc::GPUParallelDimAttr >::seqDim(), mlir::acc::ACCParMappingPolicy< mlir::acc::GPUParallelDimAttr >::vectorDim(), and mlir::acc::ACCParMappingPolicy< mlir::acc::GPUParallelDimAttr >::workerDim().
|
inline |
Definition at line 88 of file OpenACCParMapping.h.
|
inline |
Definition at line 85 of file OpenACCParMapping.h.
|
inline |
Definition at line 82 of file OpenACCParMapping.h.