Skip to content

Commit 00cc94b

Browse files
committed
Documentation
1 parent 0568cba commit 00cc94b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,20 @@ vector::isValidMaskedInputVector(ArrayRef<int64_t> shape,
393393
return success();
394394
}
395395

396+
/// Takes a 2+ dimensional vector as an input
397+
/// returns n vector values produced by n vector.extract operations.
398+
/// I.e. calling unrollVectorValue([[%v]], rewriter) such that
399+
///
400+
/// %v : vector<nxaxb...>
401+
///
402+
/// will produce the following IR changes
403+
///
404+
/// %v0 = vector.extract %v[0] : vector<axbx...>
405+
/// %v1 = vector.extract %v[1] : vector<axbx...>
406+
/// ...
407+
/// %vnminusone = vector.extract %v[n-1] : vector<axbx...>
408+
///
409+
/// and returns SmallVector<Value> r = {[[%v0]], [[%v1]], ..., [[%vnminusone]]}
396410
FailureOr<SmallVector<Value>>
397411
vector::unrollVectorValue(TypedValue<VectorType> vector,
398412
RewriterBase &rewriter) {

0 commit comments

Comments
 (0)