How Can I Use Tensorflow Without Cuda On Linux?
Solution 1:
If you build the binary with --config=cuda
(as was done for tensorflow-gpu
) then your machine must have GPU drivers. You can install GPU drivers on the machine even if the machine doesn't have GPU which is the common practical solution.
What happens is that --config=cuda
sets GOOGLE_CUDA macro in the code which changes behavior during runtime. In particular it causes dso_loader to run which you can see by following line printed
2017-02-16 17:15:08: I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.8.0.dylib locally
A popular approach at Google is to deploy a "fat" binary -- ie binary that bundles drivers and client code for all possible hardware accelerators because that simplifies testing and deployment.
In open-source release, drivers and client code are separate, but this pattern remains -- the GPU-capable binary is expecting to have GPU drivers available.
Post a Comment for "How Can I Use Tensorflow Without Cuda On Linux?"