Skip to content

Commit 312df01

Browse files
committed
Update
[ghstack-poisoned]
1 parent 40443a9 commit 312df01

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

kernels/portable/cpu/op_repeat_interleave.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ bool check_repeat_interleave_args(
2222
ET_CHECK_OR_RETURN_FALSE(
2323
repeats.scalar_type() == ScalarType::Int ||
2424
repeats.scalar_type() == ScalarType::Long,
25-
"repeats must be int or long; repeats.scalar_type() = %d",
26-
static_cast<int>(repeats.scalar_type()));
25+
"repeats must be int or long; repeats.scalar_type() = %s",
26+
toString(repeats.scalar_type()));
2727
ET_CHECK_OR_RETURN_FALSE(
2828
repeats.dim() == 1,
2929
"repeats must be 1-D; repeats.dim() = %" ET_PRI_TENSOR_DIM,

kernels/portable/cpu/util/index_util.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ bool check_gather_args(
2323
ET_LOG_AND_RETURN_IF_FALSE(tensor_has_dim(in, dim));
2424
ET_CHECK_OR_RETURN_FALSE(
2525
index.scalar_type() == ScalarType::Long,
26-
"Expected dypte int64 for index; index.scalar_type() = %d",
27-
static_cast<int>(index.scalar_type()));
26+
"Expected dtype int64 for index; index.scalar_type() = %s",
27+
toString(index.scalar_type()));
2828
if (index.numel() != 0) {
2929
ET_CHECK_OR_RETURN_FALSE(
3030
nonzero_dim(in) == nonzero_dim(index),
@@ -134,8 +134,8 @@ bool check_nonzero_args(const Tensor& in, const Tensor& out) {
134134

135135
ET_CHECK_OR_RETURN_FALSE(
136136
out.scalar_type() == ScalarType::Long,
137-
"Expected out to be a Long tensor but received %" PRId8,
138-
static_cast<int8_t>(out.scalar_type()));
137+
"Expected out to be a Long tensor but received %s",
138+
toString(out.scalar_type()));
139139

140140
ET_CHECK_OR_RETURN_FALSE(
141141
out.dim() == 2,
@@ -155,8 +155,8 @@ bool check_scatter_add_args(
155155
ET_LOG_AND_RETURN_IF_FALSE(tensors_have_same_dtype(self, src));
156156
ET_CHECK_OR_RETURN_FALSE(
157157
index.scalar_type() == ScalarType::Long,
158-
"Expected dtype int64 for index; index.scalar_type() = %d",
159-
static_cast<int>(index.scalar_type()));
158+
"Expected dtype int64 for index; index.scalar_type() = %s",
159+
toString(index.scalar_type()));
160160
ET_LOG_AND_RETURN_IF_FALSE(tensor_has_dim(self, dim));
161161

162162
if (index.numel() == 0) {

0 commit comments

Comments
 (0)