Skip to content

Commit beb5509

Browse files
committed
Attempt to fix windows build
1 parent 2b89ac8 commit beb5509

3 files changed

Lines changed: 9 additions & 15 deletions

File tree

tensorflow-core/tensorflow-core-native/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
</goals>
179179
<configuration>
180180
<skip>${dist.download.skip}</skip> <!-- skipped when full native build is enabled -->
181-
<executable>/bin/bash</executable>
181+
<executable>bash</executable>
182182
<arguments>
183183
<argument>scripts/dist_download.sh</argument>
184184
<argument>${dist.download.folder}</argument>

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ case ${PLATFORM:-} in
1717
'macosx-arm64')
1818
DOWNLOAD_URL='https://files.pythonhosted.org/packages/d3/4b/ae9037ea22ba94eb2cf267e991384c3444f3e6142fa49923352b4ab73e14/tensorflow_macos-2.14.0-cp311-cp311-macosx_12_0_arm64.whl'
1919
;;
20-
'windows')
21-
DOWNLOAD_URL='https://files.pythonhosted.org/packages/ad/6e/1bfe367855dd87467564f7bf9fa14f3b17889988e79598bc37bf18f5ffb6/tensorflow_intel-2.14.0-cp311-cp311-win_amd64.whl'
20+
'windows-x86_64')
21+
DOWNLOAD_URL='https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-2.14.0.zip'
2222
;;
2323
*)
2424
echo "TensorFlow distribution for ${PLATFORM} is not supported for download"
25-
return 1;
25+
exit 1;
2626
esac
2727

2828
mkdir -p "$DOWNLOAD_FOLDER"
@@ -33,13 +33,15 @@ if [ ! -f $DOWNLOADED_FILE ]; then
3333
fi
3434
unzip -q -u $DOWNLOADED_FILE
3535

36+
mkdir -p tensorflow
3637
cd tensorflow
3738
if [[ "$PLATFORM" =~ "linux" ]]; then
3839
ln -fs libtensorflow_cc.so.2 libtensorflow_cc.so
3940
ln -fs libtensorflow_framework.so.2 libtensorflow_framework.so
40-
4141
elif [[ "$PLATFORM" =~ "macosx" ]]; then
4242
ln -fs libtensorflow_cc.2.dylib libtensorflow_cc.dylib
4343
ln -fs libtensorflow_framework.2.dylib libtensorflow_framework.dylib
44+
elif [[ "$PLATFORM" =~ "windows" ]]; then
45+
ln -fs ../lib/tensorflow.dll tensorflow.dll
4446
fi
4547
ls -l .

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,9 @@
134134
"vcomp140",
135135
"msvcr120",
136136
"libiomp5md",
137-
"mklml",
138-
"tensorflow_framework"
137+
"mklml"
139138
},
140-
link = {"tensorflow_cc@.2"}),
141-
@Platform(
142-
value = "windows-x86",
143-
preloadpath = {
144-
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.CRT/",
145-
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.OpenMP/",
146-
"C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x86/"
147-
}),
139+
link = {"tensorflow"}),
148140
@Platform(
149141
value = "windows-x86_64",
150142
preloadpath = {

0 commit comments

Comments
 (0)