Gpu map parallel loops
gpu_map_parallel_loops
¶
MappingAttrName = 'mapping'
module-attribute
¶
MapGrid = 0
module-attribute
¶
MapBlock = 1
module-attribute
¶
Sequential = 2
module-attribute
¶
kNumHardwareIds = 3
module-attribute
¶
GpuMapParallelLoopsPattern
¶
Bases: RewritePattern
Source code in xdsl/transforms/gpu_map_parallel_loops.py
GpuMapParallelLoopsPass
dataclass
¶
Bases: ModulePass
Source code in xdsl/transforms/gpu_map_parallel_loops.py
name = 'gpu-map-parallel-loops'
class-attribute
instance-attribute
¶
getHardwareIdForMapping(level: int, dimension: int) -> ProcessorEnum
¶
Computed the hardware id to use for a given mapping level. Will assign x,y and z hardware ids for the first 3 dimensions and use sequential after.
Source code in xdsl/transforms/gpu_map_parallel_loops.py
mapParallelOp(parallelOp: ParallelOp, mappingLevel: int = MapGrid)
¶
Add mapping information to the given parallel loop. Do not add mapping information if the loop already has it. Also, don't start a mapping at a nested loop.