Skip to content

Build using nvcc + clang? #36213

@fm966mhz

Description

@fm966mhz

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

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!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions