Skip to content

Commit c0e65a0

Browse files
Github ExecutorchBujSet
authored andcommitted
Think I fixed the ci runner, but having issues with building the size test
1 parent 69ce10c commit c0e65a0

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

.github/workflows/trunk.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,13 @@ jobs:
293293
.ci/scripts/setup-arm-zephyr-tools.sh
294294
source examples/arm/ethos-u-scratch/setup_path.sh
295295
296-
# User baremetal toolchain
296+
# Use arm zephyr toolchain
297297
arm-zephyr-eabi-c++ --version
298-
toolchain_cmake=examples/arm/ethos-u-setup/arm-zephyr-eabi-gcc.cmake
299-
toolchain_cmake=$(realpath ${toolchain_cmake})
298+
zephyr_preset=tools/cmake/preset/zephyr.cmake
299+
zephyr_preset=$(realpath ${zephyr_preset})
300300
301301
# Build and test size test
302-
cmake --preset zephyr
303-
bash test/build_size_test.sh "-DCMAKE_TOOLCHAIN_FILE=${toolchain_cmake}"
302+
bash test/build_size_test.sh "-DEXECUTORCH_BUILD_PRESET_FILE=${zephyr_preset}"
304303
elf="cmake-out/test/size_test"
305304
306305
# Dump basic info
@@ -317,7 +316,7 @@ jobs:
317316
output=$(ls -la ${elf})
318317
arr=($output)
319318
size=${arr[4]}
320-
threshold="103268" # ~100KiB
319+
threshold="153600" # should be ~138KB, set threashold to 150KB
321320
echo "size: $size, threshold: $threshold"
322321
if [[ "$size" -le "$threshold" ]]; then
323322
echo "Success $size <= $threshold"

examples/arm/ethos-u-setup/arm-zephyr-eabi-gcc.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ add_compile_options(
101101
# -Wall -Wextra -Wcast-align -Wdouble-promotion -Wformat
102102
# -Wmissing-field-initializers -Wnull-dereference -Wredundant-decls -Wshadow
103103
# -Wswitch -Wswitch-default -Wunused -Wno-redundant-decls
104+
-Wno-stringop-overread
105+
-Wno-error=format=
106+
-Wno-error=maybe-uninitialized
104107
-Wno-error=deprecated-declarations
105108
-Wno-error=shift-count-overflow
106109
-Wno-psabi

runtime/executor/pte_data_map.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ PteDataMap::get_data(executorch::aten::string_view key) const {
3232
ET_CHECK_OR_RETURN_ERROR(
3333
named_data_->Get(i) != nullptr && named_data_->Get(i)->key() != nullptr,
3434
InvalidArgument,
35-
"Searching for key %.*s: NamedData at index %d is null",
35+
"Searching for key %.*s: NamedData at index %" PRId32 " is null",
3636
static_cast<int>(key.size()),
3737
key.data(),
3838
i);
@@ -47,7 +47,7 @@ PteDataMap::get_data(executorch::aten::string_view key) const {
4747
ET_CHECK_OR_RETURN_ERROR(
4848
segment_index < segments_->size(),
4949
InvalidArgument,
50-
"Segment index %zu for key %.*s is out of range for segments size %u",
50+
"Segment index %zu for key %.*s is out of range for segments size %" PRId32,
5151
segment_index,
5252
static_cast<int>(key.size()),
5353
key.data(),
@@ -74,15 +74,15 @@ ET_NODISCARD executorch::runtime::Result<const char*> PteDataMap::get_key(
7474
ET_CHECK_OR_RETURN_ERROR(
7575
index < named_data_->size(),
7676
InvalidArgument,
77-
"Index out of range: named_data size is %u, received index %u",
77+
"Index out of range: named_data size is %" PRId32 ", received index %" PRId32,
7878
named_data_->size(),
7979
index);
8080

8181
ET_CHECK_OR_RETURN_ERROR(
8282
named_data_->Get(index) != nullptr &&
8383
named_data_->Get(index)->key() != nullptr,
8484
InvalidArgument,
85-
"NamedData at index %u is null",
85+
"NamedData at index %" PRId32 " is null",
8686
index);
8787
return named_data_->Get(index)->key()->c_str();
8888
}

runtime/executor/tensor_parser_exec_aten.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ ET_NODISCARD Error validateTensorLayout(
133133
ET_CHECK_OR_RETURN_ERROR(
134134
s_tensor->sizes()->Get(i) == expected_layout.sizes()[i],
135135
InvalidExternalData,
136-
"Sizes mismatch. Expected %d, got %d for size at index %d.",
136+
"Sizes mismatch. Expected %" PRId32 ", got %" PRId32 " for size at index %d.",
137137
s_tensor->sizes()->Get(i),
138138
expected_layout.sizes()[i],
139139
i);

runtime/kernel/operator_registry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
for (const auto& meta : meta_list) { \
3535
ET_LOG(Info, "dtype: %d | dim order: [", int(meta.dtype_)); \
3636
for (size_t i = 0; i < meta.dim_order_.size(); i++) { \
37-
ET_LOG(Info, "%d,", static_cast<int32_t>(meta.dim_order_[i])); \
37+
ET_LOG(Info, "%" PRId32 ",", static_cast<int32_t>(meta.dim_order_[i])); \
3838
} \
3939
ET_LOG(Info, "]"); \
4040
}

0 commit comments

Comments
 (0)