Skip to content

Commit

Permalink
Upgrade onnxruntime to 1.16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hans00 committed Oct 19, 2023
1 parent 02191c0 commit 3d8af4a
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 34 deletions.
2 changes: 0 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ rootProject.name = 'transformers_example'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/react-native-gradle-plugin')
include ':onnxruntime-patched'
project(':onnxruntime-patched').projectDir = new File(rootProject.projectDir, '../onnxruntime-patched')

include ':android:gcanvas_library'
project(':android:gcanvas_library').projectDir = new File(rootProject.projectDir, '../node_modules/@flyskywhy/react-native-gcanvas/android/gcanvas_library')
Expand Down
16 changes: 8 additions & 8 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ PODS:
- hermes-engine/Pre-built (0.71.8)
- libevent (2.1.12)
- onnxruntime-c (1.14.0)
- onnxruntime-react-native (1.14.0):
- onnxruntime-react-native (1.16.1):
- onnxruntime-c
- React-Core
- OpenSSL-Universal (1.1.1100)
Expand Down Expand Up @@ -334,12 +334,12 @@ PODS:
- React-jsinspector (0.71.8)
- React-logger (0.71.8):
- glog
- react-native-gcanvas (6.0.3):
- react-native-gcanvas (6.0.6):
- GCanvas
- React
- react-native-image-picker (5.3.1):
- react-native-image-picker (5.6.1):
- React-Core
- react-native-quick-base64 (2.0.6):
- react-native-quick-base64 (2.0.7):
- React-Core
- React-perflogger (0.71.8)
- React-RCTActionSheet (0.71.8):
Expand Down Expand Up @@ -631,7 +631,7 @@ SPEC CHECKSUMS:
hermes-engine: 47986d26692ae75ee7a17ab049caee8864f855de
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
onnxruntime-c: 1f5923e555122d12239a1173229d6c5e8a0afd3e
onnxruntime-react-native: 8cef9ae43ece425e187415e28a2e02aee3bc80af
onnxruntime-react-native: 753834faafb338b4b5de4e41d1d595e098fe984d
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
RCTRequired: 8af6a32dfc2b65ec82193c2dee6e1011ff22ac2a
Expand All @@ -647,9 +647,9 @@ SPEC CHECKSUMS:
React-jsiexecutor: 747911ab5921641b4ed7e4900065896597142125
React-jsinspector: c712f9e3bb9ba4122d6b82b4f906448b8a281580
React-logger: 342f358b8decfbf8f272367f4eacf4b6154061be
react-native-gcanvas: f333990fb1593272cd66c70275099cdac9e33821
react-native-image-picker: ec9b713e248760bfa0f879f0715391de4651a7cb
react-native-quick-base64: 62290829c619fbabca4c41cfec75ae759d08fc1c
react-native-gcanvas: e153342af7894093b77e63a9f99639f0fa7fe3ef
react-native-image-picker: 5fcac5a5ffcb3737837f0617d43fd767249290de
react-native-quick-base64: a5dbe4528f1453e662fcf7351029500b8b63e7bb
React-perflogger: d21f182895de9d1b077f8a3cd00011095c8c9100
React-RCTActionSheet: 0151f83ef92d2a7139bba7dfdbc8066632a6d47b
React-RCTAnimation: 5ec9c0705bb2297549c120fe6473aa3e4a01e215
Expand Down
2 changes: 0 additions & 2 deletions onnxruntime-patched/build.gradle

This file was deleted.

Binary file removed onnxruntime-patched/onnxruntime-android.aar
Binary file not shown.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"mp3": "^0.1.0",
"node-fetch": "^2.6.7",
"node-wav": "^0.0.2",
"onnxruntime-react-native": "1.14.0",
"onnxruntime-react-native": "1.16.1",
"path-browserify": "^1.0.1",
"react": "18.2.0",
"react-native": "0.71.8",
Expand Down Expand Up @@ -69,6 +69,7 @@
"resolutions": {
"jpeg-js": "^0.4.4",
"node-fetch": "^2.6.7",
"xml2js": "^0.5.0"
"xml2js": "^0.5.0",
"onnxruntime-common": "1.16.1"
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
diff --git a/node_modules/onnxruntime-react-native/android/build.gradle b/node_modules/onnxruntime-react-native/android/build.gradle
index 4c8a318..65b58c1 100644
--- a/node_modules/onnxruntime-react-native/android/build.gradle
+++ b/node_modules/onnxruntime-react-native/android/build.gradle
@@ -135,5 +135,8 @@ dependencies {

// Mobile build:
// implementation "com.microsoft.onnxruntime:onnxruntime-mobile:latest.integration@aar"
- implementation "com.microsoft.onnxruntime:onnxruntime-android:latest.integration@aar"
+ // implementation "com.microsoft.onnxruntime:onnxruntime-android:latest.integration@aar"
+ // Use local AAR file
+ implementation project(":onnxruntime-patched")
+
}
diff --git a/node_modules/onnxruntime-react-native/android/src/main/java/ai/onnxruntime/reactnative/TensorHelper.java b/node_modules/onnxruntime-react-native/android/src/main/java/ai/onnxruntime/reactnative/TensorHelper.java
index 500141a..49b3abd 100644
--- a/node_modules/onnxruntime-react-native/android/src/main/java/ai/onnxruntime/reactnative/TensorHelper.java
Expand Down
65 changes: 59 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1232,11 +1232,37 @@
xcode "^3.0.1"
xml2js "0.4.23"

"@expo/config-plugins@^7.2.4":
version "7.2.5"
resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-7.2.5.tgz#b15f22878975fdc4ddcfa8cdc971937ddc4c0249"
integrity sha512-w+5ccu1IxBHgyQk9CPFKLZOk8yZQEyTjbJwOzESK1eR7QwosbcsLkN1c1WWUZYiCXwORu3UTwJYll4+X2xxJhQ==
dependencies:
"@expo/config-types" "^49.0.0-alpha.1"
"@expo/json-file" "~8.2.37"
"@expo/plist" "^0.0.20"
"@expo/sdk-runtime-versions" "^1.0.0"
"@react-native/normalize-color" "^2.0.0"
chalk "^4.1.2"
debug "^4.3.1"
find-up "~5.0.0"
getenv "^1.0.0"
glob "7.1.6"
resolve-from "^5.0.0"
semver "^7.5.3"
slash "^3.0.0"
xcode "^3.0.1"
xml2js "0.6.0"

"@expo/config-types@^45.0.0":
version "45.0.0"
resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-45.0.0.tgz#963c2fdce8fbcbd003758b92ed8a25375f437ef6"
integrity sha512-/QGhhLWyaGautgEyU50UJr5YqKJix5t77ePTwreOVAhmZH+ff3nrrtYTTnccx+qF08ZNQmfAyYMCD3rQfzpiJA==

"@expo/config-types@^49.0.0-alpha.1":
version "49.0.0"
resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-49.0.0.tgz#15ffef715285c06703f6fb7ec0cda853f645cc09"
integrity sha512-8eyREVi+K2acnMBe/rTIu1dOfyR2+AMnTLHlut+YpMV9OZPdeKV0Bs9BxAewGqBA2slslbQ9N39IS2CuTKpXkA==

"@expo/[email protected]":
version "8.2.36"
resolved "https://registry.yarnpkg.com/@expo/json-file/-/json-file-8.2.36.tgz#62a505cb7f30a34d097386476794680a3f7385ff"
Expand All @@ -1246,6 +1272,15 @@
json5 "^1.0.1"
write-file-atomic "^2.3.0"

"@expo/json-file@~8.2.37":
version "8.2.37"
resolved "https://registry.yarnpkg.com/@expo/json-file/-/json-file-8.2.37.tgz#9c02d3b42134907c69cc0a027b18671b69344049"
integrity sha512-YaH6rVg11JoTS2P6LsW7ybS2CULjf40AbnAHw2F1eDPuheprNjARZMnyHFPkKv7GuxCy+B9GPcbOKgc4cgA80Q==
dependencies:
"@babel/code-frame" "~7.10.4"
json5 "^2.2.2"
write-file-atomic "^2.3.0"

"@expo/[email protected]":
version "0.0.18"
resolved "https://registry.yarnpkg.com/@expo/plist/-/plist-0.0.18.tgz#9abcde78df703a88f6d9fa1a557ee2f045d178b0"
Expand All @@ -1255,6 +1290,15 @@
base64-js "^1.2.3"
xmlbuilder "^14.0.0"

"@expo/plist@^0.0.20":
version "0.0.20"
resolved "https://registry.yarnpkg.com/@expo/plist/-/plist-0.0.20.tgz#a6b3124438031c02b762bad5a47b70584d3c0072"
integrity sha512-UXQ4LXCfTZ580LDHGJ5q62jSTwJFFJ1GqBu8duQMThiHKWbMJ+gajJh6rsB6EJ3aLUr9wcauxneL5LVRFxwBEA==
dependencies:
"@xmldom/xmldom" "~0.7.7"
base64-js "^1.2.3"
xmlbuilder "^14.0.0"

"@expo/sdk-runtime-versions@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@expo/sdk-runtime-versions/-/sdk-runtime-versions-1.0.0.tgz#d7ebd21b19f1c6b0395e50d78da4416941c57f7c"
Expand Down Expand Up @@ -2176,7 +2220,7 @@
resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz#a1337ca426aa61cef9fe15b5b28e340a72f6fa99"
integrity sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==

"@xmldom/xmldom@~0.7.0":
"@xmldom/xmldom@~0.7.0", "@xmldom/xmldom@~0.7.7":
version "0.7.13"
resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.7.13.tgz#ff34942667a4e19a9f4a0996a76814daac364cf3"
integrity sha512-lm2GW5PkosIzccsaZIz7tp8cPADSIlIHWDFTR1N0SzfinhhYgeIQjFMz4rYzanCScr3DqQLeomUDArp6MWKm+g==
Expand Down Expand Up @@ -6459,10 +6503,10 @@ onnx-proto@^4.0.4:
dependencies:
protobufjs "^6.8.8"

onnxruntime-common@~1.14.0:
version "1.14.0"
resolved "https://registry.yarnpkg.com/onnxruntime-common/-/onnxruntime-common-1.14.0.tgz#2bb5dac5261269779aa5fb6536ca379657de8bf6"
integrity sha512-3LJpegM2iMNRX2wUmtYfeX/ytfOzNwAWKSq1HbRrKc9+uqG/FsEA0bbKZl1btQeZaXhC26l44NWpNUeXPII7Ew==
onnxruntime-common@1.16.1, onnxruntime-common@~1.14.0, onnxruntime-common@~1.16.1:
version "1.16.1"
resolved "https://registry.yarnpkg.com/onnxruntime-common/-/onnxruntime-common-1.16.1.tgz#694cd68964d2b0e4e96af8413c34763461f43aae"
integrity sha512-dmKye7bL4/aKhF561h+o9yw1hCCcGfYRN1BoycXm+WUjWhAVlGkP6JdBcRk7MQ1qX/ASFk+8Ibl+yVgCTSP0Fg==

[email protected]:
version "1.14.0"
Expand All @@ -6480,6 +6524,15 @@ [email protected]:
buffer "^6.0.3"
onnxruntime-common "~1.14.0"

[email protected]:
version "1.16.1"
resolved "https://registry.yarnpkg.com/onnxruntime-react-native/-/onnxruntime-react-native-1.16.1.tgz#ff3de790241a6b9e94b47fa0d826b68ed13da2b0"
integrity sha512-EcCPCr7fdZ41AuxaixMC/lofJ7IFjmqccV3FM6cxn05g2PCmwV5pG/Z5uLW/MGUFqGj8uvePTgRZpLeZJNE8JA==
dependencies:
"@expo/config-plugins" "^7.2.4"
buffer "^6.0.3"
onnxruntime-common "~1.16.1"

[email protected]:
version "1.14.0"
resolved "https://registry.yarnpkg.com/onnxruntime-web/-/onnxruntime-web-1.14.0.tgz#c8cee538781b1d4c1c6b043934f4a3e6ddf1466e"
Expand Down Expand Up @@ -8591,7 +8644,7 @@ xcode@^3.0.1:
simple-plist "^1.1.0"
uuid "^7.0.3"

[email protected], xml2js@^0.5.0:
[email protected], xml2js@0.6.0, xml2js@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.5.0.tgz#d9440631fbb2ed800203fad106f2724f62c493b7"
integrity sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==
Expand Down

0 comments on commit 3d8af4a

Please sign in to comment.