mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 13:50:11 +00:00
[mlir][nfc] Update comments
1. Updates and clarifies a few comments related to hooks for vector.{insert|extract}_strided_slice. 2. For consistency with vector.insert_strided_slice, removes a TODO from vector.extract_strided_slice Op def. It's self-explenatory that adding support for non-unit strides is a "TODO".
This commit is contained in:
parent
52a8bed426
commit
75b0c913a5
@ -1121,7 +1121,6 @@ def Vector_ExtractStridedSliceOp :
|
||||
attribute and extracts the n-D subvector at the proper offset.
|
||||
|
||||
At the moment strides must contain only 1s.
|
||||
// TODO: support non-1 strides.
|
||||
|
||||
Returns an n-D vector where the first k-D dimensions match the `sizes`
|
||||
attribute. The returned subvector contains the elements starting at offset
|
||||
|
@ -2789,9 +2789,11 @@ isIntegerArrayAttrConfinedToShape(OpType op, ArrayAttr arrayAttr,
|
||||
return success();
|
||||
}
|
||||
|
||||
// Returns true if all integers in `arrayAttr` are in the interval [min, max}.
|
||||
// interval. If `halfOpen` is true then the admissible interval is [min, max).
|
||||
// Otherwise, the admissible interval is [min, max].
|
||||
// Returns true if, for all indices i = 0..shape.size()-1, val is in the
|
||||
// [min, max} interval:
|
||||
// val = `arrayAttr1[i]` + `arrayAttr2[i]`,
|
||||
// If `halfOpen` is true then the admissible interval is [min, max). Otherwise,
|
||||
// the admissible interval is [min, max].
|
||||
template <typename OpType>
|
||||
static LogicalResult isSumOfIntegerArrayAttrConfinedToShape(
|
||||
OpType op, ArrayAttr arrayAttr1, ArrayAttr arrayAttr2,
|
||||
@ -2845,8 +2847,8 @@ LogicalResult InsertStridedSliceOp::verify() {
|
||||
auto stridesName = InsertStridedSliceOp::getStridesAttrName();
|
||||
if (failed(isIntegerArrayAttrConfinedToShape(*this, offsets, destShape,
|
||||
offName)) ||
|
||||
failed(isIntegerArrayAttrConfinedToRange(*this, strides, 1, 1,
|
||||
stridesName,
|
||||
failed(isIntegerArrayAttrConfinedToRange(*this, strides, /*min=*/1,
|
||||
/*max=*/1, stridesName,
|
||||
/*halfOpen=*/false)) ||
|
||||
failed(isSumOfIntegerArrayAttrConfinedToShape(
|
||||
*this, offsets,
|
||||
@ -3250,8 +3252,8 @@ LogicalResult ExtractStridedSliceOp::verify() {
|
||||
failed(isIntegerArrayAttrConfinedToShape(*this, sizes, shape, sizesName,
|
||||
/*halfOpen=*/false,
|
||||
/*min=*/1)) ||
|
||||
failed(isIntegerArrayAttrConfinedToRange(*this, strides, 1, 1,
|
||||
stridesName,
|
||||
failed(isIntegerArrayAttrConfinedToRange(*this, strides, /*min=*/1,
|
||||
/*max=*/1, stridesName,
|
||||
/*halfOpen=*/false)) ||
|
||||
failed(isSumOfIntegerArrayAttrConfinedToShape(*this, offsets, sizes,
|
||||
shape, offName, sizesName,
|
||||
|
Loading…
Reference in New Issue
Block a user