From 6166196ea7cb8b6003451da3b14884ef3d1916e2 Mon Sep 17 00:00:00 2001 From: Grisha Ivanov Date: Tue, 3 Dec 2024 00:35:30 -0800 Subject: [PATCH] make tensor_accessor compatible with mac os builds Summary: tsia Differential Revision: D66596477 --- extension/tensor/tensor_accessor.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extension/tensor/tensor_accessor.h b/extension/tensor/tensor_accessor.h index 362bdb8d72..52eafe636f 100644 --- a/extension/tensor/tensor_accessor.h +++ b/extension/tensor/tensor_accessor.h @@ -178,7 +178,7 @@ executorch::runtime::Result> make_tensor_accessor( if (N != tensor.dim()) { ET_LOG( - Error, "Expecting %zd dimensions but tensor has %zd.", N, tensor.dim()); + Error, "Expecting %zd dimensions but tensor has %zd.", static_cast(N), static_cast(tensor.dim())); return executorch::runtime::Error::InvalidArgument; } @@ -186,8 +186,8 @@ executorch::runtime::Result> make_tensor_accessor( ET_LOG( Error, "Size of data type template argument (%zd) not equal to tensor element size (%zd)", - sizeof(T), - tensor.element_size()); + static_cast(sizeof(T)), + static_cast(tensor.element_size())); return executorch::runtime::Error::InvalidArgument; }