tensorflow-cmake icon indicating copy to clipboard operation
tensorflow-cmake copied to clipboard

Is it possible to do the similar things in Windows?

Open jimmyoic opened this issue 8 years ago • 4 comments

Seems like it is feasible to integrate tensorflow in C++ project by this solution. Is there any way to do the similar things in Windows?

Since Bazel does not throughly support Windows, is it possible to build Tensorflow by cmake instead of bazel and get the same benefit?

Thanks.

jimmyoic avatar Apr 20 '17 08:04 jimmyoic

Hello, and I'm sorry for the very late response. I have recently been updating this repository to work with newer versions. As for building TensorFlow with CMake, the team at tensorflow/tensorflow/contrib/cmake do just this. However, I do not believe they have a rule to build the C++ library yet. If this becomes available in the future, one could easily use this repository to link a project on Windows.

cjweeks avatar Jun 08 '17 02:06 cjweeks

Sorry for necro-posting, just wanted to add that it's definitely possible to create a shared library with CMake on Windows now. The example command line would be the following:

cmake .. -G"Visual Studio 15 2017 Win64" -Dtensorflow_BUILD_PYTHON_BINDINGS=OFF -Dtensorflow_ENABLE_GRPC_SUPPORT=OFF -Dtensorflow_BUILD_SHARED_LIB=ON
MSBuild /p:PreferredToolArchitecture=x64 /p:Configuration=Release tensorflow.vcxproj

alex-petrenko avatar Jul 27 '17 15:07 alex-petrenko

@alex-petrenko Thank you for pointing this out. I'll look into establishing a set of instructions for using this repository on Windows.

cjweeks avatar Jul 29 '17 19:07 cjweeks

Hi,

Is there any update to build the C++ library to produce tensorflow.dll and tensorflow.lib for TensorFlow2.0?

Enigma-li avatar Dec 02 '20 23:12 Enigma-li