Skip to content

Commit 7eab0cc

Browse files
authored
make tensor_accessor compatible with mac os builds
Differential Revision: D66596477 Pull Request resolved: #7159
1 parent d89d3e7 commit 7eab0cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extension/tensor/tensor_accessor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,16 +178,16 @@ executorch::runtime::Result<TensorAccessor<T, N>> make_tensor_accessor(
178178

179179
if (N != tensor.dim()) {
180180
ET_LOG(
181-
Error, "Expecting %zd dimensions but tensor has %zd.", N, tensor.dim());
181+
Error, "Expecting %zd dimensions but tensor has %zd.", static_cast<ssize_t>(N), static_cast<ssize_t>(tensor.dim()));
182182
return executorch::runtime::Error::InvalidArgument;
183183
}
184184

185185
if (sizeof(T) != tensor.element_size()) {
186186
ET_LOG(
187187
Error,
188188
"Size of data type template argument (%zd) not equal to tensor element size (%zd)",
189-
sizeof(T),
190-
tensor.element_size());
189+
static_cast<ssize_t>(sizeof(T)),
190+
static_cast<ssize_t>(tensor.element_size()));
191191
return executorch::runtime::Error::InvalidArgument;
192192
}
193193

0 commit comments

Comments
 (0)