Lines Matching refs:create
75 Value tmp1 = create<arith::MulIOp>(int32Type, tidZ, dimY); in rewrite()
76 Value tmp2 = create<arith::AddIOp>(int32Type, tmp1, tidY); in rewrite()
77 Value tmp3 = create<arith::MulIOp>(int32Type, tmp2, dimX); in rewrite()
78 Value tmp4 = create<arith::MulIOp>(int32Type, dimX, dimY); in rewrite()
79 Value invocationIdx = create<arith::AddIOp>(int32Type, tmp3, tidX); in rewrite()
80 Value workgroupSize = create<arith::MulIOp>(int32Type, tmp4, dimZ); in rewrite()
84 create<arith::ConstantIntOp>(kSubgroupSize - 1, int32Type); in rewrite()
85 Value laneId = create<arith::AndIOp>(invocationIdx, subgroupMask); in rewrite()
87 create<arith::CmpIOp>(arith::CmpIPredicate::eq, laneId, in rewrite()
88 create<arith::ConstantIntOp>(0, int32Type)); in rewrite()
91 create<arith::SubIOp>(invocationIdx, laneId); in rewrite()
96 create<arith::SubIOp>(workgroupSize, numThreadsWithSmallerSubgroupId); in rewrite()
113 Value index = create<arith::IndexCastOp>(indexType, subgroupId); in rewrite()
114 create<memref::StoreOp>(subgroupReduce, buffer, index); in rewrite()
116 create<gpu::BarrierOp>(); in rewrite()
120 create<arith::AddIOp>(int32Type, workgroupSize, subgroupMask); in rewrite()
122 Value isValidSubgroup = create<arith::CmpIOp>(arith::CmpIPredicate::slt, in rewrite()
128 Value zero = create<arith::ConstantIndexOp>(0); in rewrite()
130 Value index = create<arith::IndexCastOp>(indexType, invocationIdx); in rewrite()
131 Value value = create<memref::LoadOp>(valueType, buffer, index); in rewrite()
134 create<memref::StoreOp>(result, buffer, zero); in rewrite()
138 create<gpu::BarrierOp>(); in rewrite()
139 Value result = create<memref::LoadOp>(valueType, buffer, zero); in rewrite()
147 T create(Args... args) { in create() function
148 return rewriter.create<T>(loc, std::forward<Args>(args)...); in create()
154 Value dim = create<T>(indexType, dimension); in getDimOp()
155 return create<arith::IndexCastOp>(int32Type, dim); in getDimOp()
197 create<cf::BranchOp>(block, ValueRange()); in getFactory()
251 return create<T>(lhs.getType(), lhs, rhs); in getFactory()
260 Value cmp = rewriter.create<T>(loc, predicate, lhs, rhs); in getCmpFactory()
261 return rewriter.create<arith::SelectOp>(loc, cmp, lhs, rhs); in getCmpFactory()
288 create<cf::CondBranchOp>(condition, thenBlock, in createIf()
294 create<cf::BranchOp>(continueBlock, thenOperands); in createIf()
298 create<cf::BranchOp>(continueBlock, elseOperands); in createIf()
325 Value subgroupSize = create<arith::ConstantIntOp>(kSubgroupSize, int32Type); in createSubgroupReduce()
326 Value isPartialSubgroup = create<arith::CmpIOp>(arith::CmpIPredicate::slt, in createSubgroupReduce()
339 Value offset = create<arith::ConstantIntOp>(i, int32Type); in createSubgroupReduce()
340 auto shuffleOp = create<gpu::ShuffleOp>( in createSubgroupReduce()
361 Value offset = create<arith::ConstantIntOp>(i, int32Type); in createSubgroupReduce()
363 create<gpu::ShuffleOp>(shuffleType, value, offset, subgroupSize, in createSubgroupReduce()
374 Value subgroupSize = create<arith::ConstantIntOp>(kSubgroupSize, int32Type); in getDivideBySubgroupSize()
375 return create<arith::DivSIOp>(int32Type, value, subgroupSize); in getDivideBySubgroupSize()