-
Notifications
You must be signed in to change notification settings - Fork 74.9k
Description
Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 18.04
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
- TensorFlow installed from (source or binary): source
- TensorFlow version: commit c044803 (with the problem in Build fails with messages including "undefined reference to symbol 'acos@@GLIBC_2.2.5' ", "Linking of rule '@flatbuffers//:flatc' failed" #36170 fixed locally)
- Python version: 3.7.6
- Installed using virtualenv? pip? conda?: conda
- Bazel version (if compiling from source): 1.2.1
- GCC/Compiler version (if compiling from source): gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
- CUDA/cuDNN version: V10.1.243/7.6.5
- GPU model and memory: GeForce GTX 1080, 8116 MiB
Describe the problem
I was able to build Tensorflow with (bazel build tensorflow/tools/pip_package:build_pip_package
) using nvcc + gcc. But if I tried to manully override gcc using clang (8.0.1), the build will fail with
clang: error: unknown argument: '-fno-canonical-system-headers'
It seems the CC toolchain auto config still generates flags for nvcc + gcc, even though I choose to use clang. I confirmed that my gcc has this flag while my clang does not.
If I choose to use clang as CUDA compiler, it would fail with
error: cannot find libdevice for sm_61.
which seems to mean that Clang cannot compile for this cuda compute capabilities (6.1). So I am wondering if there is any way of using nvcc + clang to build since I use clang as default (for all other builds). Shouldn't this be possible since clang is used by default on Macs? Thanks!