diff --git a/kernels/portable/cpu/util/advanced_index_util.cpp b/kernels/portable/cpu/util/advanced_index_util.cpp index 3022ec61b93..cc205df0e43 100644 --- a/kernels/portable/cpu/util/advanced_index_util.cpp +++ b/kernels/portable/cpu/util/advanced_index_util.cpp @@ -51,7 +51,7 @@ bool check_mask_indices(const Tensor& in, TensorOptList indices) { index.dim() > 0, "Zero-dimensional mask index not allowed"); for (auto j = 0; j < index.dim(); j++) { if (index.size(j) != in.size(in_i + j)) { -#ifdef ET_LOG_ENABLED +#if ET_LOG_ENABLED auto mask_shape = executorch::runtime::tensor_shape_to_c_string( executorch::runtime::Span( index.sizes().data(), index.sizes().size())); diff --git a/kernels/portable/cpu/util/broadcast_util.cpp b/kernels/portable/cpu/util/broadcast_util.cpp index 90f84854e80..d8569d23c2f 100644 --- a/kernels/portable/cpu/util/broadcast_util.cpp +++ b/kernels/portable/cpu/util/broadcast_util.cpp @@ -214,7 +214,7 @@ ET_NODISCARD Error get_broadcast_target_size( const size_t out_sizes_len, size_t* out_dim) { if ET_UNLIKELY (!tensors_are_broadcastable_between(a_size, b_size)) { -#ifdef ET_LOG_ENABLED +#if ET_LOG_ENABLED executorch::runtime::Span a_size_span( a_size.data(), a_size.size()); executorch::runtime::Span b_size_span( diff --git a/runtime/core/portable_type/tensor_impl.cpp b/runtime/core/portable_type/tensor_impl.cpp index 5eecf591cff..b978e23cbd6 100644 --- a/runtime/core/portable_type/tensor_impl.cpp +++ b/runtime/core/portable_type/tensor_impl.cpp @@ -95,7 +95,7 @@ Error TensorImpl::internal_resize_contiguous(ArrayRef new_sizes) { switch (shape_dynamism_) { case TensorShapeDynamism::STATIC: if (!std::equal(sizes_, sizes_ + dim_, new_sizes.begin())) { -#ifdef ET_LOG_ENABLED +#if ET_LOG_ENABLED executorch::runtime::Span sizes_span( sizes().data(), sizes().size()); executorch::runtime::Span new_sizes_span(