From 6e77806f7133db6131ac528091d6ea141de32a00 Mon Sep 17 00:00:00 2001 From: jiangyuhao Date: Fri, 24 May 2024 11:05:37 +0800 Subject: [PATCH] Update macro TORCH_MLU_CHECK --- mmcv/ops/csrc/pytorch/mlu/mlu_common_helper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mmcv/ops/csrc/pytorch/mlu/mlu_common_helper.h b/mmcv/ops/csrc/pytorch/mlu/mlu_common_helper.h index 22fe67c8e1..69c5056534 100644 --- a/mmcv/ops/csrc/pytorch/mlu/mlu_common_helper.h +++ b/mmcv/ops/csrc/pytorch/mlu/mlu_common_helper.h @@ -143,7 +143,7 @@ class MluOpHandle { template void convertShapeAndStride(std::vector& shape_info, std::vector& stride_info) { - TORCH_MLU_CHECK(shape_info.size() == stride_info.size(), + TORCH_CHECK(shape_info.size() == stride_info.size(), "shape size need equal to stride size."); const int dim = shape_info.size(); std::vector temp_shape_info(dim); @@ -168,7 +168,7 @@ std::vector checkUpperBoundAndCastTo(const std::vector& input) { output.reserve(input.size()); for (const auto& val : input) { if (val > std::numeric_limits::max()) { - TORCH_MLU_CHECK(false, "Requires dim size not greater than ", + TORCH_CHECK(false, "Requires dim size not greater than ", std::numeric_limits::max(), ". But got ", val, "."); }