Attempting to build Tensorflow 2.10 from source in Windows

Hello, I am a Windows user and I would like to use my GPU so I am using TF 2.10
I am following this guide Build from source on Windows  |  TensorFlow
notably, I have Visual Studio 2022 installed and I have also installed the MSVC 142 , and added BAZEL_VC_FULL_VERSION=“14.29.30133” to the environment variables

the bazel build command completed successfully and I found build_pip_package.exe in the \tensorflow\bazel-out\x64_windows-opt\bin\tensorflow\tools\pip_package directory
after copying it to the tensorflow directory, and running build_pip_package C:/tmp/tensorflow_pkg, there is a problem:
build_pip_package.exe keeps spawning new copies of itself and bash.exe , until eventually it quits with LAUNCHER ERROR: Cannot launch process: "C:/msys64/usr/bin/bash.exe Reason: (error: 8): Not enough memory resources are available to process this command.


Maybe not so helpful, but have you tried Visual Studio 19? In theory, yes, VS22 with MSVC 142 should indeed behave like VS19, but I’d never take a bet on it, mainly when dealing with such things (from the guide):

set BAZEL_VS=C:/Program Files(x86)/Microsoft Visual Studio/2019/BuildTools 
set BAZEL_VC=C:/Program Files(x86)/Microsoft Visual Studio/2019/BuildTools/VC

To this point:

Hello, I am a Windows user and I would like to use my GPU so I am using TF 2.10

Does your use case absolutely require building from source? You definitely can have this via pip.


I am trying to access TensorRT to accelerate some inference work I am doing, this implies installing CUDA, which implies using 2.10 since CUDA on Windows is locked out since 2.11