Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions examples/arm/zephyr/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ CONFIG_EXECUTORCH=y
CONFIG_CPP=y
CONFIG_STD_CPP17=y

# Needed as kernels/portable/cpu/op_allclose.cpp uses isfinite() instead of std::isfinite()
# If you fully delegated your model to Ethos-U you could remove this and save some space
CONFIG_NEWLIB_LIBC=y

# Config - increased for ExecuTorch memory requirements
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_HEAP_MEM_POOL_SIZE=32768
Expand Down
5 changes: 3 additions & 2 deletions kernels/portable/cpu/op_allclose.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
* Copyright 2025 Arm Limited and/or its affiliates.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/

#include <executorch/runtime/kernel/kernel_includes.h>
#include <executorch/runtime/platform/compiler.h>
#include <math.h>
#include <string.h>
#include <cmath>

namespace torch {
namespace executor {
Expand Down Expand Up @@ -42,7 +43,7 @@ bool data_is_close(
} else {
auto allowed_error = atol + fabs(rtol * b[i]);
auto actual_error = fabs(a[i] - b[i]);
if (!isfinite(actual_error) || actual_error > allowed_error) {
if (!std::isfinite(actual_error) || actual_error > allowed_error) {
return false;
}
}
Expand Down
Loading