@@ -2823,7 +2823,7 @@ void BoundInterpreterFunction::fwdGatherRangesInstImpl(
28232823
28242824 // Keep track of the total number of elements gathered across all
28252825 // examples for a sanity check later.
2826- dim_t grandTotalLen = 0 ;
2826+ [[maybe_unused]] dim_t grandTotalLen = 0 ;
28272827
28282828 // For each example in ranges:
28292829 for (dim_t example = 0 ; example < numExamples; ++example) {
@@ -5284,7 +5284,7 @@ void BoundInterpreterFunction::fwdSparseLengthsSumInstI8Impl(
52845284 auto LH = lengths->getHandle <int32_t >();
52855285
52865286 size_t segments = lengths->dims ()[0 ];
5287- size_t totalLength = 0 ;
5287+ [[maybe_unused]] size_t totalLength = 0 ;
52885288 for (size_t i = 0 ; i < segments; i++) {
52895289 totalLength += LH.raw (i);
52905290 }
@@ -5334,7 +5334,7 @@ void BoundInterpreterFunction::fwdSparseLengthsSumInstFloatImpl(
53345334 auto LH = lengths->getHandle <int32_t >();
53355335
53365336 size_t segments = lengths->dims ()[0 ];
5337- size_t totalLength = 0 ;
5337+ [[maybe_unused]] size_t totalLength = 0 ;
53385338 for (size_t i = 0 ; i < segments; i++) {
53395339 totalLength += LH.raw (i);
53405340 }
@@ -5386,7 +5386,7 @@ void BoundInterpreterFunction::fwdSparseLengthsWeightedSumInstFloatImpl(
53865386 auto LH = lengths->getHandle <int32_t >();
53875387
53885388 size_t segments = lengths->dims ()[0 ];
5389- size_t totalLength = 0 ;
5389+ [[maybe_unused]] size_t totalLength = 0 ;
53905390 for (dim_t i = 0 ; i < segments; i++) {
53915391 totalLength += LH.raw (i);
53925392 }
@@ -5427,7 +5427,7 @@ void BoundInterpreterFunction::fwdSparseLengthsWeightedSumInstI8Impl(
54275427 auto LH = lengths->getHandle <int32_t >();
54285428
54295429 dim_t segments = lengths->dims ()[0 ];
5430- dim_t totalLength = 0 ;
5430+ [[maybe_unused]] dim_t totalLength = 0 ;
54315431 for (dim_t i = 0 ; i < segments; i++) {
54325432 totalLength += LH.raw (i);
54335433 }
@@ -5503,7 +5503,7 @@ void BoundInterpreterFunction::fwdSparseLengthsWeightedSumGradInst(
55035503 auto IH = indices->getHandle <int64_t >();
55045504
55055505 size_t segments = lengths->dims ()[0 ];
5506- size_t totalLength = 0 ;
5506+ [[maybe_unused]] size_t totalLength = 0 ;
55075507 for (size_t i = 0 ; i < segments; ++i) {
55085508 totalLength += LH.raw (i);
55095509 }
@@ -5682,7 +5682,7 @@ void BoundInterpreterFunction::fwdRowwiseQuantizedSparseLengthsWeightedSumImpl(
56825682 auto LH = lengths->getHandle <int32_t >();
56835683
56845684 dim_t segments = lengths->dims ()[0 ];
5685- dim_t totalLength = 0 ;
5685+ [[maybe_unused]] dim_t totalLength = 0 ;
56865686 for (dim_t i = 0 ; i < segments; i++) {
56875687 totalLength += LH.raw (i);
56885688 }
@@ -5777,7 +5777,7 @@ void BoundInterpreterFunction::
57775777 auto LH = lengths->getHandle <int32_t >();
57785778
57795779 size_t segments = lengths->dims ()[0 ];
5780- size_t totalLength = 0 ;
5780+ [[maybe_unused]] size_t totalLength = 0 ;
57815781 for (size_t i = 0 ; i < segments; i++) {
57825782 totalLength += LH.raw (i);
57835783 }
0 commit comments