Lines Matching refs:create

201     coords[i] = b.create<arith::RemSIOp>(index, tripCounts[i]);  in delinearize()
202 index = b.create<arith::DivSIOp>(index, tripCounts[i]); in delinearize()
261 func::FuncOp func = func::FuncOp::create( in createParallelComputeFunction()
286 Value c0 = b.create<arith::ConstantIndexOp>(0); in createParallelComputeFunction()
287 Value c1 = b.create<arith::ConstantIndexOp>(1); in createParallelComputeFunction()
294 return b.create<arith::ConstantOp>(attr); in createParallelComputeFunction()
313 tripCount = b.create<arith::MulIOp>(tripCount, tripCounts[i]); in createParallelComputeFunction()
317 Value blockFirstIndex = b.create<arith::MulIOp>(blockIndex, blockSize); in createParallelComputeFunction()
321 Value blockEnd0 = b.create<arith::AddIOp>(blockFirstIndex, blockSize); in createParallelComputeFunction()
322 Value blockEnd1 = b.create<arith::MinSIOp>(blockEnd0, tripCount); in createParallelComputeFunction()
323 Value blockLastIndex = b.create<arith::SubIOp>(blockEnd1, c1); in createParallelComputeFunction()
336 blockEndCoord[i] = b.create<arith::AddIOp>(blockLastCoord[i], c1); in createParallelComputeFunction()
379 computeBlockInductionVars[loopIdx] = b.create<arith::AddIOp>( in createParallelComputeFunction()
380 lowerBounds[loopIdx], b.create<arith::MulIOp>(iv, steps[loopIdx])); in createParallelComputeFunction()
383 isBlockFirstCoord[loopIdx] = b.create<arith::CmpIOp>( in createParallelComputeFunction()
385 isBlockLastCoord[loopIdx] = b.create<arith::CmpIOp>( in createParallelComputeFunction()
390 isBlockFirstCoord[loopIdx] = b.create<arith::AndIOp>( in createParallelComputeFunction()
392 isBlockLastCoord[loopIdx] = b.create<arith::AndIOp>( in createParallelComputeFunction()
401 b.create<scf::ForOp>(c0, tripCounts[loopIdx + 1], c1, ValueRange(), in createParallelComputeFunction()
407 auto lb = b.create<arith::SelectOp>(isBlockFirstCoord[loopIdx], in createParallelComputeFunction()
410 auto ub = b.create<arith::SelectOp>(isBlockLastCoord[loopIdx], in createParallelComputeFunction()
414 b.create<scf::ForOp>(lb, ub, c1, ValueRange(), in createParallelComputeFunction()
418 b.create<scf::YieldOp>(loc); in createParallelComputeFunction()
432 b.create<scf::ForOp>(blockFirstCoord[0], blockEndCoord[0], c1, ValueRange(), in createParallelComputeFunction()
434 b.create<func::ReturnOp>(ValueRange()); in createParallelComputeFunction()
480 func::FuncOp func = func::FuncOp::create(loc, "async_dispatch_fn", type); in createAsyncDispatchFunction()
494 Value c1 = b.create<arith::ConstantIndexOp>(1); in createAsyncDispatchFunction()
495 Value c2 = b.create<arith::ConstantIndexOp>(2); in createAsyncDispatchFunction()
510 scf::WhileOp whileOp = b.create<scf::WhileOp>(types, operands); in createAsyncDispatchFunction()
520 Value distance = b.create<arith::SubIOp>(end, start); in createAsyncDispatchFunction()
522 b.create<arith::CmpIOp>(arith::CmpIPredicate::sgt, distance, c1); in createAsyncDispatchFunction()
523 b.create<scf::ConditionOp>(dispatch, before->getArguments()); in createAsyncDispatchFunction()
532 Value distance = b.create<arith::SubIOp>(end, start); in createAsyncDispatchFunction()
533 Value halfDistance = b.create<arith::DivSIOp>(distance, c2); in createAsyncDispatchFunction()
534 Value midIndex = b.create<arith::AddIOp>(start, halfDistance); in createAsyncDispatchFunction()
545 executeBuilder.create<func::CallOp>(executeLoc, func.getSymName(), in createAsyncDispatchFunction()
547 executeBuilder.create<async::YieldOp>(executeLoc, ValueRange()); in createAsyncDispatchFunction()
551 auto execute = b.create<ExecuteOp>(TypeRange(), ValueRange(), ValueRange(), in createAsyncDispatchFunction()
553 b.create<AddToGroupOp>(indexTy, execute.token(), group); in createAsyncDispatchFunction()
554 b.create<scf::YieldOp>(ValueRange({start, midIndex})); in createAsyncDispatchFunction()
566 b.create<func::CallOp>(computeFunc.func.getSymName(), in createAsyncDispatchFunction()
569 b.create<func::ReturnOp>(ValueRange()); in createAsyncDispatchFunction()
587 Value c0 = b.create<arith::ConstantIndexOp>(0); in doAsyncDispatch()
588 Value c1 = b.create<arith::ConstantIndexOp>(1); in doAsyncDispatch()
604 b.create<arith::CmpIOp>(arith::CmpIPredicate::eq, blockCount, c1); in doAsyncDispatch()
613 b.create<func::CallOp>(parallelComputeFunction.func.getSymName(), in doAsyncDispatch()
616 b.create<scf::YieldOp>(); in doAsyncDispatch()
625 Value groupSize = b.create<arith::SubIOp>(blockCount, c1); in doAsyncDispatch()
626 Value group = b.create<CreateGroupOp>(GroupType::get(ctx), groupSize); in doAsyncDispatch()
632 b.create<func::CallOp>(asyncDispatchFunction.getSymName(), in doAsyncDispatch()
637 b.create<AwaitAllOp>(group); in doAsyncDispatch()
639 b.create<scf::YieldOp>(); in doAsyncDispatch()
643 b.create<scf::IfOp>(TypeRange(), isSingleBlock, syncDispatch, asyncDispatch); in doAsyncDispatch()
657 Value c0 = b.create<arith::ConstantIndexOp>(0); in doSequentialDispatch()
658 Value c1 = b.create<arith::ConstantIndexOp>(1); in doSequentialDispatch()
663 Value groupSize = b.create<arith::SubIOp>(blockCount, c1); in doSequentialDispatch()
664 Value group = b.create<CreateGroupOp>(GroupType::get(ctx), groupSize); in doSequentialDispatch()
691 executeBuilder.create<func::CallOp>(executeLoc, compute.getSymName(), in doSequentialDispatch()
694 executeBuilder.create<async::YieldOp>(executeLoc, ValueRange()); in doSequentialDispatch()
698 auto execute = b.create<ExecuteOp>(TypeRange(), ValueRange(), ValueRange(), in doSequentialDispatch()
700 b.create<AddToGroupOp>(rewriter.getIndexType(), execute.token(), group); in doSequentialDispatch()
701 b.create<scf::YieldOp>(); in doSequentialDispatch()
705 b.create<scf::ForOp>(c1, blockCount, c1, ValueRange(), loopBuilder); in doSequentialDispatch()
708 b.create<func::CallOp>(compute.getSymName(), compute.getCallableResults(), in doSequentialDispatch()
712 b.create<AwaitAllOp>(group); in doSequentialDispatch()
748 tripCount = b.create<arith::MulIOp>(tripCount, tripCounts[i]); in matchAndRewrite()
752 Value c0 = b.create<arith::ConstantIndexOp>(0); in matchAndRewrite()
754 b.create<arith::CmpIOp>(arith::CmpIPredicate::eq, tripCount, c0); in matchAndRewrite()
758 nestedBuilder.create<scf::YieldOp>(loc); in matchAndRewrite()
808 numWorkerThreadsVal = b.create<arith::ConstantIndexOp>(numWorkerThreads); in matchAndRewrite()
810 numWorkerThreadsVal = b.create<async::RuntimeNumWorkerThreadsOp>(); in matchAndRewrite()
829 Value scalingFactor = b.create<arith::ConstantFloatOp>( in matchAndRewrite()
832 Value bracketBegin = b.create<arith::ConstantIndexOp>(p.first); in matchAndRewrite()
833 Value inBracket = b.create<arith::CmpIOp>( in matchAndRewrite()
835 Value bracketScalingFactor = b.create<arith::ConstantFloatOp>( in matchAndRewrite()
837 scalingFactor = b.create<arith::SelectOp>(inBracket, bracketScalingFactor, in matchAndRewrite()
841 b.create<arith::IndexCastOp>(b.getI32Type(), numWorkerThreadsVal); in matchAndRewrite()
843 b.create<arith::SIToFPOp>(b.getF32Type(), numWorkersIndex); in matchAndRewrite()
845 b.create<arith::MulFOp>(scalingFactor, numWorkersFloat); in matchAndRewrite()
847 b.create<arith::FPToSIOp>(b.getI32Type(), scaledNumWorkers); in matchAndRewrite()
849 b.create<arith::IndexCastOp>(b.getIndexType(), scaledNumInt); in matchAndRewrite()
851 Value maxComputeBlocks = b.create<arith::MaxSIOp>( in matchAndRewrite()
852 b.create<arith::ConstantIndexOp>(1), scaledWorkers); in matchAndRewrite()
858 Value bs0 = b.create<arith::CeilDivSIOp>(tripCount, maxComputeBlocks); in matchAndRewrite()
859 Value bs1 = b.create<arith::MaxSIOp>(bs0, minTaskSize); in matchAndRewrite()
860 Value blockSize = b.create<arith::MinSIOp>(tripCount, bs1); in matchAndRewrite()
870 Value blockCount = b.create<arith::CeilDivSIOp>(tripCount, blockSize); in matchAndRewrite()
879 b.create<scf::YieldOp>(); in matchAndRewrite()
890 Value numIters = b.create<arith::ConstantIndexOp>( in matchAndRewrite()
892 Value alignedBlockSize = b.create<arith::MulIOp>( in matchAndRewrite()
893 b.create<arith::CeilDivSIOp>(blockSize, numIters), numIters); in matchAndRewrite()
896 b.create<scf::YieldOp>(); in matchAndRewrite()
903 Value numIters = b.create<arith::ConstantIndexOp>( in matchAndRewrite()
905 Value useBlockAlignedComputeFn = b.create<arith::CmpIOp>( in matchAndRewrite()
908 b.create<scf::IfOp>(TypeRange(), useBlockAlignedComputeFn, in matchAndRewrite()
910 b.create<scf::YieldOp>(); in matchAndRewrite()
917 b.create<scf::IfOp>(TypeRange(), isZeroIterations, noOp, dispatch); in matchAndRewrite()
932 return builder.create<arith::ConstantIndexOp>(minTaskSize); in runOnOperation()