Skip to content

Commit

Permalink
Update macro TORCH_MLU_CHECK
Browse files Browse the repository at this point in the history
  • Loading branch information
ClowDragon authored and fuwenguang committed May 24, 2024
1 parent 8dc41e5 commit 6e77806
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mmcv/ops/csrc/pytorch/mlu/mlu_common_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class MluOpHandle {
template <typename T>
void convertShapeAndStride(std::vector<T>& shape_info,
std::vector<T>& 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<T> temp_shape_info(dim);
Expand All @@ -168,7 +168,7 @@ std::vector<DST_T> checkUpperBoundAndCastTo(const std::vector<SRC_T>& input) {
output.reserve(input.size());
for (const auto& val : input) {
if (val > std::numeric_limits<DST_T>::max()) {
TORCH_MLU_CHECK(false, "Requires dim size not greater than ",
TORCH_CHECK(false, "Requires dim size not greater than ",
std::numeric_limits<DST_T>::max(), ". But got ", val,
".");
}
Expand Down

0 comments on commit 6e77806

Please sign in to comment.