Skip to content

Commit a63cd2f

Browse files
committed
Fix release mode
1 parent b7c1a38 commit a63cd2f

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

include/matx/core/make_tensor.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -636,17 +636,17 @@ auto make_tensor( TensorType &tensor,
636636
case kDLComplex: {
637637
switch (dt.dtype.bits) {
638638
case 128: {
639-
constexpr bool same = std::is_same_v<T, cuda::std::complex<double>>;
639+
[[maybe_unused]] constexpr bool same = std::is_same_v<T, cuda::std::complex<double>>;
640640
MATX_ASSERT_STR(same, matxInvalidType, "DLPack/MatX type mismatch");
641641
break;
642642
}
643643
case 64: {
644-
constexpr bool same = std::is_same_v<T, cuda::std::complex<float>>;
644+
[[maybe_unused]] constexpr bool same = std::is_same_v<T, cuda::std::complex<float>>;
645645
MATX_ASSERT_STR(same, matxInvalidType, "DLPack/MatX type mismatch");
646646
break;
647647
}
648648
case 32: {
649-
constexpr bool same = std::is_same_v<T, matxFp16Complex> || std::is_same_v<T, matxBf16Complex>;
649+
[[maybe_unused]] constexpr bool same = std::is_same_v<T, matxFp16Complex> || std::is_same_v<T, matxBf16Complex>;
650650
MATX_ASSERT_STR(same, matxInvalidType, "DLPack/MatX type mismatch");
651651
break;
652652
}
@@ -659,17 +659,17 @@ auto make_tensor( TensorType &tensor,
659659
case kDLFloat: {
660660
switch (dt.dtype.bits) {
661661
case 64: {
662-
constexpr bool same = std::is_same_v<T, double>;
662+
[[maybe_unused]] constexpr bool same = std::is_same_v<T, double>;
663663
MATX_ASSERT_STR(same, matxInvalidType, "DLPack/MatX type mismatch");
664664
break;
665665
}
666666
case 32: {
667-
constexpr bool same = std::is_same_v<T, float>;
667+
[[maybe_unused]] constexpr bool same = std::is_same_v<T, float>;
668668
MATX_ASSERT_STR(same, matxInvalidType, "DLPack/MatX type mismatch");
669669
break;
670670
}
671671
case 16: {
672-
constexpr bool same = std::is_same_v<T, matxFp16> || std::is_same_v<T, matxBf16>;
672+
[[maybe_unused]] constexpr bool same = std::is_same_v<T, matxFp16> || std::is_same_v<T, matxBf16>;
673673
MATX_ASSERT_STR(same, matxInvalidType, "DLPack/MatX type mismatch");
674674
break;
675675
}
@@ -681,22 +681,22 @@ auto make_tensor( TensorType &tensor,
681681
case kDLInt: {
682682
switch (dt.dtype.bits) {
683683
case 64: {
684-
constexpr bool same = std::is_same_v<T, int64_t>;
684+
[[maybe_unused]] constexpr bool same = std::is_same_v<T, int64_t>;
685685
MATX_ASSERT_STR(same, matxInvalidType, "DLPack/MatX type mismatch");
686686
break;
687687
}
688688
case 32: {
689-
constexpr bool same = std::is_same_v<T, int32_t>;
689+
[[maybe_unused]] constexpr bool same = std::is_same_v<T, int32_t>;
690690
MATX_ASSERT_STR(same, matxInvalidType, "DLPack/MatX type mismatch");
691691
break;
692692
}
693693
case 16: {
694-
constexpr bool same = std::is_same_v<T, int16_t>;
694+
[[maybe_unused]] constexpr bool same = std::is_same_v<T, int16_t>;
695695
MATX_ASSERT_STR(same, matxInvalidType, "DLPack/MatX type mismatch");
696696
break;
697697
}
698698
case 8: {
699-
constexpr bool same = std::is_same_v<T, int8_t>;
699+
[[maybe_unused]] constexpr bool same = std::is_same_v<T, int8_t>;
700700
MATX_ASSERT_STR(same, matxInvalidType, "DLPack/MatX type mismatch");
701701
break;
702702
}
@@ -708,22 +708,22 @@ auto make_tensor( TensorType &tensor,
708708
case kDLUInt: {
709709
switch (dt.dtype.bits) {
710710
case 64: {
711-
constexpr bool same = std::is_same_v<T, uint64_t>;
711+
[[maybe_unused]] constexpr bool same = std::is_same_v<T, uint64_t>;
712712
MATX_ASSERT_STR(same, matxInvalidType, "DLPack/MatX type mismatch");
713713
break;
714714
}
715715
case 32: {
716-
constexpr bool same = std::is_same_v<T, uint32_t>;
716+
[[maybe_unused]] constexpr bool same = std::is_same_v<T, uint32_t>;
717717
MATX_ASSERT_STR(same, matxInvalidType, "DLPack/MatX type mismatch");
718718
break;
719719
}
720720
case 16: {
721-
constexpr bool same = std::is_same_v<T, uint16_t>;
721+
[[maybe_unused]] constexpr bool same = std::is_same_v<T, uint16_t>;
722722
MATX_ASSERT_STR(same, matxInvalidType, "DLPack/MatX type mismatch");
723723
break;
724724
}
725725
case 8: {
726-
constexpr bool same = std::is_same_v<T, uint8_t>;
726+
[[maybe_unused]] constexpr bool same = std::is_same_v<T, uint8_t>;
727727
MATX_ASSERT_STR(same, matxInvalidType, "DLPack/MatX type mismatch");
728728
break;
729729
}

0 commit comments

Comments
 (0)