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

Build fails due to missing visibility declaration for hipfft target #26269

Open
TimoStolz opened this issue Feb 3, 2025 · 3 comments
Open

Build fails due to missing visibility declaration for hipfft target #26269

TimoStolz opened this issue Feb 3, 2025 · 3 comments
Assignees
Labels
AMD GPU Issues pertaining to AMD GPUs (ROCM) bug Something isn't working build

Comments

@TimoStolz
Copy link

Description

Description

When building JAX with ROCm support, the build fails due to a visibility issue with the hipfft target.

Error Message

ERROR: /external/xla/xla/stream_executor/rocm/BUILD:409:11: 
in cc_library rule @xla//xla/stream_executor/rocm:hipfft_if_static: 
target '@local_config_rocm//rocm:hipfft' is not visible from target '@xla//xla/stream_executor/rocm:hipfft_if_static'. 
Check the visibility declaration of the former target if you think the dependency is legitimate

Environment

  • ROCm Version: 6.2.41134-0
  • GPU: AMD Radeon Pro W7900 (gfx1100)
  • OS: Arch Linux
  • Build Command:
    python3 ./build/build.py build \
      --wheels=jaxlib,jax-rocm-plugin,jax-rocm-pjrt \
      --rocm_path=/opt/rocm \
      --clang_path=/usr/lib/llvm18/bin/clang-18 \
      --rocm_version=62 \
      --rocm_amdgpu_targets=gfx1100 \
      --use_clang

Solution

The hipfft target in /external/local_config_rocm/rocm/BUILD needs a public visibility declaration. Other similar targets in the same file (hipblas, hiprand, etc.) already have this visibility set, but it seems to have been overlooked for hipfft.
The fix is to add visibility = ["//visibility:public"] to the hipfft target:

cc_library(
    name = "hipfft",
    srcs = glob(["rocm_dist/lib/libhipfft*.so*"]),
    include_prefix = "rocm",
    includes = [
        "rocm_dist/include",
    ],
    linkstatic = 1,
    visibility = ["//visibility:public"],  # Added this line to match other ROCm libraries
    deps = [":rocm_config"],
)

After applying this change, the build proceeded successfully.

System info (python version, jaxlib version, accelerator, etc.)

jax:    0.5.1.dev20250131+c1e136058
jaxlib: 0.5.0
numpy:  2.2.2
python: 3.13.1 (main, Dec  4 2024, 18:05:56) [GCC 14.2.1 20240910]
device info: cpu-1, 1 local devices"
process_count: 1
platform: uname_result(system='Linux', node='timos-pc', release='6.12.10-arch1-1', version='#1 SMP PREEMPT_DYNAMIC Sat, 18 Jan 2025 02:26:57 +0000', machine='x86_64')
@TimoStolz TimoStolz added the bug Something isn't working label Feb 3, 2025
@hawkinsp hawkinsp added AMD GPU Issues pertaining to AMD GPUs (ROCM) build labels Feb 3, 2025
@hawkinsp
Copy link
Collaborator

hawkinsp commented Feb 3, 2025

If you know the fix, send a PR? In this case, it probably needs to be sent to the openxla/xla project, I think.

@JehandadKhan
Copy link
Collaborator

JehandadKhan commented Feb 3, 2025 via email

@mrodden
Copy link
Collaborator

mrodden commented Feb 3, 2025

I think this might have already been fixed in xla and jax just hasn't picked up the latest.

see: openxla/xla@991a228

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMD GPU Issues pertaining to AMD GPUs (ROCM) bug Something isn't working build
Projects
None yet
Development

No branches or pull requests

4 participants