Comments (12)
follow https://www.tensorflow.org/install/install_sources_windows to prepare the environment.
git clone https://github.com/tensorflow/tensorflow.git -b v1.11.0-rc1
cd tensorflow
python ./configure.py
...
bazel build --config=opt --config=cuda //tensorflow:libtensorflow_cc.so
You will get the libtensorflow_cc.so
in tensorflow\bazel-out\x64_windows-opt\bin\tensorflow
.
libtensorflow_cc.so
is a dll, gen the .lib from it and link it and look if it works or not.
from tensorflow-windows-wheel.
Thank you for your quick response. Note that I have already built the library that way. My problem is that the .lib file it produces is much smaller than your produced by cmake. And I can not properly link a simple program with this smaller lib while I have no problems with yours. The dll (so) files are about the same size though. Did you do something in your cmake build to have a single tensorflow.lib (not tensorflow.dll) that you would need to link against any program
from tensorflow-windows-wheel.
I think in your cmake you have CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS which is probably why it is much larger than mine and also good for linking. If I do a
dumpbin /exports libtensorflow_cc.so
on the bazel created so, I get much less exported symbols than
dumpbin /exports tensorflow.dll
on your dll.
from tensorflow-windows-wheel.
Maybe use --config=monolithic
and https://github.com/tensorflow/tensorflow/blob/v1.10.0/tensorflow/contrib/cmake/tools/create_def_file.py to gen shared lib from static lib is a way to work.
from tensorflow-windows-wheel.
@fo40225 With this process can you assign a specific GPU on windows using tensorflow_cc.dll?
from tensorflow-windows-wheel.
@ttdd11
tensorflow/tensorflow@0c8deb2
The instruction in commit message may work, I haven't try it.
from tensorflow-windows-wheel.
@fo40225 These look they they are for tensorflow.dll not tensorflow_cc.dll. The issue I'm having is that I can't assign a graph to a specific gpu. Have you been able to achieve this?
from tensorflow-windows-wheel.
@fo40225 But generally to make the tensorflow_cc.dll and .lib you are using the bazel build instructions. How are you exporting the correct symbols?
from tensorflow-windows-wheel.
@ttdd11 Using the bazel build instructions above only generate the .dll with no .lib file and .dll contains only C symbol not C++.
The commit not only fix the libtensorflow.so (C lib) but also fix the libtensorflow_cc.so (C++ lib).
Just try to checkout the commit and bazel build --config=opt //tensorflow:tensorflow_cc
.
good luck
from tensorflow-windows-wheel.
@fo40225 Have you been able to set device in the c_api? I think this have been broken for about a year.
from tensorflow-windows-wheel.
@ttdd11 try to use the file in https://github.com/fo40225/tensorflow-windows-wheel/tree/master/1.10.0/cpp to see if it helps or not
or just wait google totally fix building cpp lib of tensorflow on windows tensorflow/tensorflow#26152
from tensorflow-windows-wheel.
@fo40225 I need to build with CUDA 10 for rtx support. How do I test the branch in the second link? doesn't look like its in yet.
from tensorflow-windows-wheel.
Related Issues (20)
- Please make cp38 sse2 cpu only build, thanks! HOT 1
- Linux binaries HOT 1
- google.protobuf.pyext error HOT 7
- How can I unzip this files: HOT 3
- Are some zip files missing for tensorflow-windows-wheel/2.4.0/py38/CPU+GPU/cuda111cudnn8sse2/ ? HOT 7
- ERROR: tensorflow_gpu-1.8.0-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform HOT 2
- Tensorflow 2.4, Compute capability 3.0 HOT 1
- Python 3.8 & Compute Capability 3.0 HOT 2
- How to reduce the size of tensorflow.dll HOT 6
- 1.15.4, Python 3.6, CUDA 10.2, AVX2, NN 7.6.5.32, Compute 3.5 for Kepler
- Tensorflow 2.5 HOT 3
- I have unzipped and installed tensorflow2.4.0.whl,but how can I use it in VS2017 or 2019? HOT 1
- Can you help me build Debug Version of Tensorflow for CPU HOT 2
- Linux HOT 1
- help for 1.15.5 HOT 3
- Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found? HOT 3
- Tensorflow 1.4 with python 2.7. HOT 3
- Could you build CUDA116, cudnn8302,tensorflow? HOT 1
- tensorflow version 2.10.0
- Tensorflow 2.13, CUDA 12.2, Python 3.11, no AVX?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow-windows-wheel.