@@ -23,8 +23,8 @@ bool check_gather_args(
23
23
ET_LOG_AND_RETURN_IF_FALSE (tensor_has_dim (in, dim));
24
24
ET_CHECK_OR_RETURN_FALSE (
25
25
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 ()));
28
28
if (index .numel () != 0 ) {
29
29
ET_CHECK_OR_RETURN_FALSE (
30
30
nonzero_dim (in) == nonzero_dim (index ),
@@ -134,8 +134,8 @@ bool check_nonzero_args(const Tensor& in, const Tensor& out) {
134
134
135
135
ET_CHECK_OR_RETURN_FALSE (
136
136
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 ()));
139
139
140
140
ET_CHECK_OR_RETURN_FALSE (
141
141
out.dim () == 2 ,
@@ -155,8 +155,8 @@ bool check_scatter_add_args(
155
155
ET_LOG_AND_RETURN_IF_FALSE (tensors_have_same_dtype (self, src));
156
156
ET_CHECK_OR_RETURN_FALSE (
157
157
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 ()));
160
160
ET_LOG_AND_RETURN_IF_FALSE (tensor_has_dim (self, dim));
161
161
162
162
if (index .numel () == 0 ) {
0 commit comments