Skip to content

Commit a942f7c

Browse files
authored
[mlir][sparse] move variable into assert to avoid 'unused' error (#68604)
1 parent 414709e commit a942f7c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ class NewCallParams final {
200200
/// MLIR buffers as needed, and returning `this` for method chaining.
201201
NewCallParams &genBuffers(SparseTensorType stt,
202202
ArrayRef<Value> dimSizesValues) {
203-
const Dimension dimRank = stt.getDimRank();
204-
assert(dimSizesValues.size() == static_cast<size_t>(dimRank));
203+
assert(dimSizesValues.size() == static_cast<size_t>(stt.getDimRank()));
205204
// Sparsity annotations.
206205
params[kParamLvlTypes] = genLvlTypesBuffer(builder, loc, stt);
207206
// Construct dimSizes, lvlSizes, dim2lvl, and lvl2dim buffers.

0 commit comments

Comments
 (0)