Skip to content

Commit

Permalink
Added option to build tensorflow with AVX2 support on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
emgucv committed Nov 7, 2023
1 parent 9352bc6 commit ba72a21
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion platforms/windows/bazel_build_tf.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ REM @echo off
REM POSSIBLE OPTIONS:
REM %1%: "64", "ARM"
REM %2%: "gpu", build with CUDA
REM %3%: "mkl", build with intel mkl
REM %3%: "mkl", build with intel mkl. Doesn't work, MKL not supported on windows: https://github.com/tensorflow/tensorflow/issues/61661
REM %3% "avx2", build with avx2 support
REM %4%: "docker", build within docker

pushd %~p0
Expand Down Expand Up @@ -117,6 +118,13 @@ GOTO END_MKL
SET TF_BAZEL_EXTRA_CONFIG=%TF_BAZEL_EXTRA_CONFIG% --config=mkl
:END_MKL

IF "%3%" == "avx2" GOTO BUILD_WITH_AVX2
GOTO END_AVX2
:BUILD_WITH_AVX2
SET TF_BAZEL_EXTRA_CONFIG=%TF_BAZEL_EXTRA_CONFIG% --copt=/arch:AVX2
:END_AVX2


IF "%2%" == "gpu" GOTO BUILD_GPU
:BUILD_CPU
call cmd.exe /v /c "set PATH=%MSYS64_BIN%;%PATH% & %MSYS64_BIN%\bash.exe libtensorflow_cpu.sh"
Expand Down

0 comments on commit ba72a21

Please sign in to comment.