Skip to content

Commit de74460

Browse files
ZephyrUserBujSet
authored andcommitted
Able to run the build_size_test, but exporting the models seems to fail
1 parent ef663f0 commit de74460

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

kernels/portable/cpu/op_repeat_interleave.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ bool check_repeat_interleave_args(
5050
for (const auto i : c10::irange(repeats.numel())) {
5151
ET_CHECK_OR_RETURN_FALSE(
5252
repeats_data[i] >= 0,
53-
"repeats cannot be negative; repeats_data[%" PRId64 "] = %d",
53+
"repeats cannot be negative; repeats_data[%" PRId64 "] = %ld",
5454
static_cast<int64_t>(i),
5555
repeats_data[i]);
5656
}

kernels/portable/cpu/util/math_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ template <
183183
typename std::enable_if<std::is_floating_point<CTYPE>::value, int>::type =
184184
0>
185185
CTYPE remainder_override(CTYPE a, CTYPE b) {
186-
float rem = std::fmod(a, b);
186+
CTYPE rem = std::fmod(a, b);
187187
if (((a < 0) ^ (b < 0)) && rem != 0) {
188188
rem += b;
189189
}

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 %lu 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 %lu",
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 %lu, received index %lu",
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 %lu is null",
8686
index);
8787
return named_data_->Get(index)->key()->c_str();
8888
}

runtime/executor/tensor_parser_exec_aten.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ ET_NODISCARD Result<void*> getMemPlannedPtr(
6363
"size_t cannot hold memory offset 0x%08" PRIx32 ".%08" PRIx32,
6464
memory_offset_high,
6565
memory_offset_low);
66-
memory_offset |= static_cast<size_t>(memory_offset_high) << 32;
66+
// memory_offset |= static_cast<size_t>(memory_offset_high) << 32;
6767
}
6868
return allocator->get_offset_address(memory_id, memory_offset, nbytes);
6969
}
@@ -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 %ld, got %ld 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, "%ld,", static_cast<int32_t>(meta.dim_order_[i])); \
3838
} \
3939
ET_LOG(Info, "]"); \
4040
}

test/build_size_test.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ cmake_install_executorch_lib() {
2525

2626
CXXFLAGS="$COMMON_CXXFLAGS" retry cmake \
2727
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
28-
-DCMAKE_TOOLCHAIN_FILE="/workspace/executorch/examples/arm/ethos-u-setup/arm-zephyr-eabi-gcc.cmake" \
28+
-DCMAKE_TOOLCHAIN_FILE="/home/zephyruser/executorch/examples/arm/ethos-u-setup/arm-zephyr-eabi-gcc.cmake" \
2929
-DCMAKE_INSTALL_PREFIX=cmake-out \
30-
-DEXECUTORCH_PAL_DEFAULT=minimal \
30+
-DEXECUTORCH_PAL_DEFAULT=posix \
3131
-DCMAKE_BUILD_TYPE=Release \
3232
-DEXECUTORCH_BUILD_EXECUTOR_RUNNER=OFF \
3333
-DEXECUTORCH_OPTIMIZE_SIZE=ON \
3434
-DEXECUTORCH_BUILD_PTHREADPOOL=OFF \
3535
-DEXECUTORCH_BUILD_CPUINFO=OFF \
36-
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
36+
-DEXECUTORCH_ENABLE_LOGGING=ON \
3737
${EXTRA_BUILD_ARGS} \
3838
-Bcmake-out .
3939
cmake --build cmake-out -j9 --target install --config Release
@@ -42,6 +42,7 @@ cmake_install_executorch_lib() {
4242
test_cmake_size_test() {
4343
CXXFLAGS="$COMMON_CXXFLAGS" retry cmake -DCMAKE_BUILD_TYPE=Release \
4444
-DCMAKE_INSTALL_PREFIX=cmake-out \
45+
-DCMAKE_TOOLCHAIN_FILE="/home/zephyruser/executorch/examples/arm/ethos-u-setup/arm-zephyr-eabi-gcc.cmake" \
4546
${EXTRA_BUILD_ARGS} \
4647
-Bcmake-out/test test
4748

0 commit comments

Comments
 (0)