I am facing a problem when trying to use tensorflow-gpu 1.6+ precompiled packages on Windows 10. As it states in the release notes, the new builds have the AVX instructions included, which aren't supported by my CPU (Xeon 5670).
I am using Cuda 9.1 and CUDNN 7.1 which works fine with prebuild tensorflow-gpu 1.5 version.
When I am trying to compile, either with CMAKE or bazel my build fails.
With CMAKE I get 2 compilation errors and with bazel 1.
I am using this guide as reference.http://www.python36.com/install-tensorflow-gpu-windows/ for CMAKE and for bazel I used MINGW64 to run ./configure and then bazel build command.
I have also tried at first with Visual Studio 2017, now with 2015 and both of them fail to build.
I have all the prerequisites downloaded and installed.
CMAKE version: 3.11.1
Bazel version: bazel-0.13.0-windows-x86_64.exe
Any hints or info would be appreciated!
Related
I trying to ran a python code on gpu using tensorflow-gpu=1.6.0
I have installed tensorflow using conda command that suppose to install all the required lib
when I run the code I get the error below:
Loaded runtime CuDNN library: 7605 (compatibility version 7600) but source was compiled with 7102 (compatibility version 7100). If using a binary install, upgrade your CuDNN library to match. If building from sources, make sure the library loaded at runtime matches a compatible version specified during compile configuration.
2021-02-16 02:29:34.892462: F tensorflow/core/kernels/conv_ops.cc:717] Check failed: stream->parent()->GetConvolveAlgorithms( conv_parameters.ShouldIncludeWinogradNonfusedAlgo(), &algorithms)
anybody could help me how to find and install the compatible version using conda in order to solve this issue...thanks in advance
This page lists tensorflow/cudnn compatibility:
https://www.tensorflow.org/install/source#linux
seems you will need to install cudnn 7 rather than 7.6 to use tf 1.6.0
I am building a GPU Version of lightgbm(Windows). I've followed all the Installation Guide in https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#build-gpu-version:
Windows On Windows GPU version of LightGBM can be built using OpenCL,
Boost, CMake and VS Build Tools or MinGW.
If you use MinGW, the build procedure is similar to the build on
Linux. Refer to GPU Windows Compilation to get more details.
Following procedure is for the MSVC (Microsoft Visual C++) build.
Install Git for Windows, CMake (3.8 or higher) and VS Build Tools (VS
Build Tools is not needed if Visual Studio (2015 or newer) is
installed).
Install OpenCL for Windows. The installation depends on the brand
(NVIDIA, AMD, Intel) of your GPU card.
For running on Intel, get Intel SDK for OpenCL. For running on AMD,
get AMD APP SDK. For running on NVIDIA, get CUDA Toolkit. Further
reading and correspondence table: GPU SDK Correspondence and Device
Targeting Table.
Install Boost Binary.
Note: Match your Visual C++ version:
Visual Studio 2015 -> msvc-14.0-64.exe,
Visual Studio 2017 -> msvc-14.1-64.exe.
Run the following commands:
Set BOOST_ROOT=C:\local\boost_1_64_0\
Set BOOST_LIBRARYDIR=C:\local\boost_1_64_0\lib64-msvc-14.0
git clone --recursive https://github.com/Microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DUSE_GPU=1 ..
cmake --build . --target ALL_BUILD --config Release
But in the last step when I input
cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DUSE_GPU=1 ..
I got the error:
C:\Windows\System32\LightGBM\build>cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DUSE_GPU=1 ..
-- Selecting Windows SDK version to target Windows 10.0.17134.
CMake Error at CMakeLists.txt:7 (PROJECT):
Failed to run MSBuild command:
C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) 生成引擎版本 14.0.25420.1
版权所有(C) Microsoft Corporation。保留所有权利。
MSBUILD : error MSB1009: 项目文件不存在。
开关:VCTargetsPath.vcxproj
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Windows/System32/LightGBM/build/CMakeFiles/CMakeOutput.log".
CMakeOutput.log:
The system is: Windows - 10.0.17134 - AMD64
Today, I got the tensorflow from the github and then used it with CMake to compile it.
This is my vs2017 CMD Command:
C:\...\build2017>cmake .. -A x64 -DCMAKE_BUILD_TYPE=Release
-DPYTHON_EXECUTABLE="C:\Anaconda3\python.exe"
-DPYTHON_LIBRARIES="C:\Anaconda3\libs\python35.lib"
-Dtensorflow_WIN_CPU_SIMD_OPTIONS=/arch:AVX
-DCMAKE_BUILD_TYPE=Release
-Dtensorflow_BUILD_CC_EXAMPLE=ON
-Dtensorflow_ENABLE_GRPC_SUPPORT=OFF
Then I use
MSBuild /p:Configuration=Release tf_python_build_pip_package.vcxproj
However, I got 48 errors. Most of these errors are like this
“absl/strings/string_view.h”: No such file or directory
How can I fix it?
Tensorflow release 1.10.0 was the last release supporting cmake and it is no longer supported in favor of bazel.
Refer to the TF 1.10.0 release notes:
https://github.com/tensorflow/tensorflow/blob/master/RELEASE.md#breaking-changes
Trying to build tensorflow 1.9 on debian 10 with cuda 9.1.85
and cudnn 7.1.4.18
When using gcc-6 as the compiler and build command
bazel build --verbose_failures --config=opt --config=cuda --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" //tensorflow/tools/pip_package:build_pip_package
I get
INFO: From Compiling external/nccl_archive
/src/libwrap.cu.cc:
/usr/lib/cuda/include/cuda_fp16.h(2958): error: identifier "__float2half_rn" is undefined
/usr/lib/cuda/include/cuda_fp16.h(3000): error: identifier "__float2half_rn" is undefined
2 errors detected in the compilation of "/tmp/tmpxft_000070b1_00000000-6_libwrap.cu.cpp1.ii".
This was happening as the build was finding some cuda headers left over from a previous cuda 8.0 installation and these functions are not implemented there. After cleaning up these the build completed successfully.
So, I've installed Bazel via Chocolatey, installed Python 3.5 and 2.7, installed CUDA v8, and cuDNN v6, and installed JDK 8.0, I'm now trying to custom-build TensorFlow on my Windows 10 device, with AVX, AVX 2 and CUDA. TensorFlow-GPU, the pre-built version, does work, I've already tested and run that successfully.
I've followed the instructions of other articles, both on TensorFlows' actual site (trying to adapt some sections from the Linux/Mac installs), and on here. The furthest I've made it is; cloning the Github repository via Msys2, running configure.py, then attempting to build via bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package I receive an error, the header of which is:
Error reading java.io.IOException: CreateProcess(): The system cannot find the file specified.
: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include/cudnn.h
I've double checked, that file does exist, so I'm not sure why I'm getting this error.
EDIT: Also attempted to run via Powershell, reached the same point.
Any help would be much appreciated.
I had the exact same error while trying to build Tensorflow on Windows (using cuDNN 5.1). I fixed it by launching bazel from the msys2 terminal (instead of from the windows command prompt) and manually setting the BAZEL_SH environment variable before attempting to build.
export BAZEL_SH=c:/tools/msys64/usr/bin/bash.exe
bazel build -c opt --config=win-cuda tensorflow/cc:cc_ops
The following steps helped me to compile Tensorflow on Windows 10.
pacman -Syuu patch
ln -s "c:\python27\python.exe" /usr/bin/python
export BAZEL_SH=c:/tools/msys64/usr/bin/bash.exe
"C:\Documents and Settings\All Users\chocolatey\bin\bazel.exe" build --config=opt --config=win-cuda //tensorflow/tools/pip_package:build_pip_package
But after 1 hour of compilation I got another error:
C:\tools\msys64\tmp_bazel_dmitry\x1e5egqw\execroot\org_tensorflow\external\protobuf_archive\python\google\protobuf\internal\api_implementation.cc
: fatal error C1083: Cannot open compiler generated file: '': Invalid
argument Target //tensorflow/tools/pip_package:build_pip_package
failed to build