tensorflow: Problems when building tensorflow with CUDA
When I built tensorflow from source with CUDA using bazel,I got the following errors:
external/com_google_absl/absl/strings/string_view.h(496): warning: expression has no effect
external/com_google_absl/absl/strings/str_cat.h(259): error: expression must have a constant value
external/com_google_absl/absl/strings/str_cat.h(259): error: expression must have a constant value
I add some codes like std::cout<<"using cpu for Launch<Device>"<<std::endl;.Is there anything wrong? Thanks for any help.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 15 (4 by maintainers)
Latest version of TensorFlow is tested against CUDA 9.0. If you are using a different version of CUDA you have to build TF from sources yourself. Feel free to open a new and fill all the information provided by the template if you are facing problems. This will help us to focus on a specific issues since system configurations can vary widely from user to user. Thanks!
@yunjiangster try clean previous build and add
--copt="-fPIC"and then build again. I can successfully build tf-serving with CUDA 9 on CentOS 7 using script like bellow (change the values of env variables according to your system):You can try to install tensorflow-gpu from anaconda