Skip to content

Commit 1e86980

Browse files
snadampalCraigacp
authored andcommitted
linux-arm64 fixes to package the right dependencies into tensorflow native jar
1 parent 759d2eb commit 1e86980

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tensorflow-core/tensorflow-core-native/scripts/dist_download.sh

+6
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ if [[ -n "$WHEEL_URL" ]]; then
3737
curl -L $WHEEL_URL --output 'tensorflow.whl'
3838
fi
3939
yes | unzip -q -u 'tensorflow.whl' # use 'yes' because for some reasons -u does not work on Windows
40+
if [[ "$PLATFORM" == "linux-arm64" ]]; then
41+
cp $DOWNLOAD_FOLDER/tensorflow.libs/* $DOWNLOAD_FOLDER/tensorflow/
42+
fi
4043
fi
4144

4245
if [[ -n "$CLIB_URL" ]]; then
@@ -51,6 +54,9 @@ cd tensorflow
5154
if [[ "$PLATFORM" =~ "linux" ]]; then
5255
ln -fs libtensorflow_cc.so.2 libtensorflow_cc.so
5356
ln -fs libtensorflow_framework.so.2 libtensorflow_framework.so
57+
if [[ "$PLATFORM" == "linux-arm64" ]]; then
58+
ln -fs libomp-*.so.5 libomp.so
59+
fi
5460
elif [[ "$PLATFORM" =~ "macosx" ]]; then
5561
ln -fs libtensorflow_cc.2.dylib libtensorflow_cc.dylib
5662
ln -fs libtensorflow_framework.2.dylib libtensorflow_framework.dylib

tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/presets/tensorflow.java

+3
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@
6262
},
6363
6464
resource = {"LICENSE", "THIRD_PARTY_TF_JNI_LICENSES"}),
65+
@Platform(
66+
value = {"linux-arm64"},
67+
6568
@Platform(
6669
value = "windows",
6770
preload = {

0 commit comments

Comments
 (0)