Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USE_CLANG does not get set in crosstool_wrapper_driver_rocm.tpl #20874

Open
davidheiss opened this issue Dec 26, 2024 · 3 comments
Open

USE_CLANG does not get set in crosstool_wrapper_driver_rocm.tpl #20874

davidheiss opened this issue Dec 26, 2024 · 3 comments

Comments

@davidheiss
Copy link

I encountered a build error when building JAX for ROCm.
It seemed like the 'compiler' template value don't get set, causing an unknown compiler flag for clang.

Might have something to do with recent changes in #19691 #19767.

# Template values set by rocm_configure.bzl.
CPU_COMPILER = ('%{cpu_compiler}')
USE_CLANG = ('%{compiler}' == 'clang')
HOST_COMPILER_PATH = ('%{host_compiler_path}')

https://github.com/openxla/xla/blob/e52f275aba0ba1cf9573df906b14d8f3bcedf8c6/third_party/tsl/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_rocm.tpl#L27C1-L27C39

@davidheiss
Copy link
Author

For me removing this lines from the template resolves the issue.

  if not USE_CLANG:
      cpu_compiler_flags.append('-fno-canonical-system-headers')

https://github.com/openxla/xla/blob/e52f275aba0ba1cf9573df906b14d8f3bcedf8c6/third_party/tsl/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_rocm.tpl#L267C1-L267C65

@davidheiss
Copy link
Author

The build command for JAX (release/0.4.38) was this one:

python ./build/build.py build --wheels=jaxlib,jax-rocm-plugin,jax-rocm-pjrt --rocm_version=60 --rocm_path=/opt/rocm --clang_path=/opt/rocm/llvm/bin/clang

@akuegel
Copy link
Member

akuegel commented Jan 8, 2025

@draganmladjenovic can you maybe route this to someone from AMD, or look into it yourself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants