Lines Matching defs:GpuAllReduceRewriter
30 struct GpuAllReduceRewriter { struct
31 using AccumulatorFactory = std::function<Value(Value, Value)>;
33 GpuAllReduceRewriter(gpu::GPUFuncOp funcOp, gpu::AllReduceOp reduceOp, in GpuAllReduceRewriter() function
67 void rewrite() { in rewrite()
149 T create(Args... args) { in create()
155 Value getDimOp(gpu::Dimension dimension) { in getDimOp()
161 Value createWorkgroupBuffer() { in createWorkgroupBuffer()
172 AccumulatorFactory getFactory() { in getFactory()
185 AccumulatorFactory getFactory(Region &body) { in getFactory()
218 AccumulatorFactory getFactory(gpu::AllReduceOperation opName) { in getFactory()
238 void createIf(Value condition, ThenOpsFactory &&thenOpsFactory, in createIf()
268 void createPredicatedBlock(Value condition, Factory &&predicatedOpsFactory) { in createPredicatedBlock()
283 Value createSubgroupReduce(Value activeWidth, Value laneId, Value operand, in createSubgroupReduce()
333 Value getDivideBySubgroupSize(Value value) { in getDivideBySubgroupSize()
338 gpu::GPUFuncOp funcOp;
339 gpu::AllReduceOp reduceOp;
340 PatternRewriter &rewriter;
342 Location loc;
343 Type valueType;
344 Type indexType;
345 IntegerType int32Type;
347 static constexpr int kSubgroupSize = 32;