This commit is contained in:
@@ -50,10 +50,9 @@ static bool isBatchOutputArgument(SpatComputeBatch batchOp, Value value) {
|
||||
|
||||
template <typename ComputeOpTy>
|
||||
static LogicalResult verifyStaticWeights(ComputeOpTy computeOp, StringRef kind) {
|
||||
for (Value weight : computeOp.getWeights()) {
|
||||
for (Value weight : computeOp.getWeights())
|
||||
if (!isCompileTimeComputable(weight))
|
||||
return computeOp.emitOpError() << kind << " weights must be statically computed from constants";
|
||||
}
|
||||
return success();
|
||||
}
|
||||
|
||||
@@ -131,11 +130,9 @@ verifyStaticUnitStrideExtractSliceOp(tensor::ExtractSliceOp sliceOp, BlockArgume
|
||||
return sliceOp.emitOpError() << kind << " requires static slice sizes";
|
||||
|
||||
auto offsets = sliceOp.getOffsets();
|
||||
for (auto [offsetIndex, offset] : llvm::enumerate(offsets)) {
|
||||
bool supported = offsetIndex == 0 ? isSupportedLaneOffsetExpr(offset, laneArg) : isConstantIndexLike(offset);
|
||||
if (!supported)
|
||||
for (Value offset : offsets)
|
||||
if (!isSupportedLaneOffsetExpr(offset, laneArg))
|
||||
return sliceOp.emitOpError() << kind << " requires simple lane-dependent offsets";
|
||||
}
|
||||
|
||||
return success();
|
||||
}
|
||||
@@ -155,11 +152,9 @@ static LogicalResult verifyStaticUnitStrideParallelInsertSliceOp(tensor::Paralle
|
||||
return sliceOp.emitOpError() << kind << " requires static slice sizes";
|
||||
|
||||
auto offsets = sliceOp.getOffsets();
|
||||
for (auto [offsetIndex, offset] : llvm::enumerate(offsets)) {
|
||||
bool supported = offsetIndex == 0 ? isSupportedLaneOffsetExpr(offset, laneArg) : isConstantIndexLike(offset);
|
||||
if (!supported)
|
||||
for (Value offset : offsets)
|
||||
if (!isSupportedLaneOffsetExpr(offset, laneArg))
|
||||
return sliceOp.emitOpError() << kind << " requires simple lane-dependent offsets";
|
||||
}
|
||||
|
||||
return success();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user