Skip to content

Commit ef06295

Browse files
committed
Add asserts
1 parent 760787b commit ef06295

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mlir/lib/Dialect/SPIRV/IR/SPIRVTypes.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,12 @@ Type CooperativeMatrixType::getElementType() const {
245245
}
246246

247247
uint32_t CooperativeMatrixType::getRows() const {
248+
assert(getImpl()->shape[0] != ShapedType::kDynamic);
248249
return static_cast<uint32_t>(getImpl()->shape[0]);
249250
}
250251

251252
uint32_t CooperativeMatrixType::getColumns() const {
253+
assert(getImpl()->shape[1] != ShapedType::kDynamic);
252254
return static_cast<uint32_t>(getImpl()->shape[1]);
253255
}
254256

0 commit comments

Comments
 (0)