Skip to content

Commit a46ec71

Browse files
authored
build: bump executorch to v1.2.0 (#1076)
## Description Updates ExecuTorch binaries and header files to version v1.2.0 ### Introduces a breaking change? - [ ] Yes - [x] No ### Type of change - [ ] Bug fix (change which fixes an issue) - [ ] New feature (change which adds functionality) - [ ] Documentation update (improves or adds clarity to existing documentation) - [x] Other (chores, tests, code style improvements etc.) ### Tested on - [x] iOS - [x] Android ### Testing instructions <!-- Provide step-by-step instructions on how to test your changes. Include setup details if necessary. --> - [ ] Run tests from `packages/react-native-executorch/common/rnexecutorch/tests`. - [ ] Build all example apps on both Android and iOS and verify that models work as expected. ### Screenshots <!-- Add screenshots here, if applicable --> ### Related issues <!-- Link related issues here using #issue-number --> Closes #1057 ### Checklist - [ ] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly - [x] My changes generate no new warnings ### Additional notes <!-- Include any additional information, assumptions, or context that reviewers might need to understand this PR. --> The binaries were built from https://github.com/barhanc/executorch/tree/rne-build-v1.2.0. The header files also come from there.
1 parent a69f920 commit a46ec71

45 files changed

Lines changed: 401 additions & 47 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/react-native-executorch/android/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,7 @@ set(INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../third-party/include")
2626

2727
# Treat third-party headers as system headers to suppress deprecation warnings
2828
include_directories(SYSTEM "${INCLUDE_DIR}")
29+
include_directories(SYSTEM "${INCLUDE_DIR}/cpuinfo")
30+
include_directories(SYSTEM "${INCLUDE_DIR}/pthreadpool")
2931

3032
add_subdirectory("${ANDROID_CPP_DIR}")
11.3 KB
Binary file not shown.

packages/react-native-executorch/common/rnexecutorch/tests/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ target_include_directories(rntests_core PUBLIC
115115
${RNEXECUTORCH_DIR}
116116
${COMMON_DIR}
117117
${PACKAGE_ROOT}/third-party/include
118+
${PACKAGE_ROOT}/third-party/include/cpuinfo
119+
${PACKAGE_ROOT}/third-party/include/pthreadpool
118120
${REACT_NATIVE_DIR}/ReactCommon
119121
${REACT_NATIVE_DIR}/ReactCommon/jsi
120122
${REACT_NATIVE_DIR}/ReactCommon/callinvoker

packages/react-native-executorch/react-native-executorch.podspec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ Pod::Spec.new do |s|
1919
phonemis_binaries_path = File.expand_path('$(PODS_TARGET_SRCROOT)/third-party/ios/libs/phonemis', __dir__)
2020

2121
s.user_target_xcconfig = {
22-
"HEADER_SEARCH_PATHS" => "$(PODS_TARGET_SRCROOT)/third-party/include",
22+
"HEADER_SEARCH_PATHS" =>
23+
'"$(PODS_TARGET_SRCROOT)/third-party/include" '+
24+
'"$(PODS_TARGET_SRCROOT)/third-party/include/cpuinfo" '+
25+
'"$(PODS_TARGET_SRCROOT)/third-party/include/pthreadpool"',
2326

2427
"OTHER_LDFLAGS[sdk=iphoneos*]" => [
2528
'$(inherited)',
@@ -45,6 +48,8 @@ Pod::Spec.new do |s|
4548
'"$(PODS_TARGET_SRCROOT)/ios" '+
4649
'"$(PODS_TARGET_SRCROOT)/third-party/include/executorch/extension/llm/tokenizers/include" '+
4750
'"$(PODS_TARGET_SRCROOT)/third-party/include" '+
51+
'"$(PODS_TARGET_SRCROOT)/third-party/include/cpuinfo" '+
52+
'"$(PODS_TARGET_SRCROOT)/third-party/include/pthreadpool" '+
4853
'"$(PODS_TARGET_SRCROOT)/common" ',
4954
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
5055
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'x86_64',
Binary file not shown.
Binary file not shown.

packages/react-native-executorch/third-party/include/executorch/extension/data_loader/buffer_data_loader.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#pragma once
1010

11+
#include <c10/util/safe_numerics.h>
1112
#include <cstring>
1213
#include <executorch/runtime/core/data_loader.h>
1314
#include <executorch/runtime/core/error.h>
@@ -33,7 +34,9 @@ class BufferDataLoader final : public executorch::runtime::DataLoader {
3334
executorch::runtime::Result<executorch::runtime::FreeableBuffer>
3435
load(size_t offset, size_t size,
3536
ET_UNUSED const DataLoader::SegmentInfo &segment_info) const override {
36-
ET_CHECK_OR_RETURN_ERROR(offset + size <= size_, InvalidArgument,
37+
size_t total_size;
38+
bool overflow = c10::add_overflows(offset, size, &total_size);
39+
ET_CHECK_OR_RETURN_ERROR(!overflow && total_size <= size_, InvalidArgument,
3740
"offset %zu + size %zu > size_ %zu", offset, size,
3841
size_);
3942
return executorch::runtime::FreeableBuffer(data_ + offset, size,

packages/react-native-executorch/third-party/include/executorch/extension/llm/tokenizers/include/pytorch/tokenizers/hf_tokenizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ class HFTokenizer : public Tokenizer {
8080
Model::Ptr _model;
8181
};
8282

83-
} // namespace tokenizers
83+
} // namespace tokenizers

packages/react-native-executorch/third-party/include/executorch/extension/llm/tokenizers/include/pytorch/tokenizers/model.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,4 @@ class ModelConfig {
148148
Model::Ptr create() const;
149149
};
150150

151-
} // namespace tokenizers
151+
} // namespace tokenizers

packages/react-native-executorch/third-party/include/executorch/extension/llm/tokenizers/include/pytorch/tokenizers/truncation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ class TruncationConfig {
8989
TruncationParams params;
9090
};
9191

92-
} // namespace tokenizers
92+
} // namespace tokenizers

0 commit comments

Comments
 (0)