Giter Club home page Giter Club logo

Comments (14)

jpsamaroo avatar jpsamaroo commented on June 1, 2024

This is a very unfortunate situation caused by issues with weak symbols causing linking against the wrong libLLVM: JuliaLang/julia#36342. The core issue is that multiple users of LLVM (Julia and probably ROCm comgr) register options in LLVM on startup, which causes the same LLVM options to be registered more than once in the same library (hence the error).

The only way I know of to work around this is to rebuild your ROCm stack to use a static build of LLVM, which is then directly compiled into the ROCm stack components that use it. Unfortunately, LLVM.jl cannot be run with Julia built against static LLVM. The directions for how to compile a static LLVM are here: https://paste.sr.ht/~jpsamaroo/462a58b32961d93227120173e26d91cdb410cc1a. You then need to build ROCT and ROCR against this LLVM; let me know if you need help getting them to build and run.

from amdgpu.jl.

jpsamaroo avatar jpsamaroo commented on June 1, 2024

Slight edit: Technically ROCR and ROCT don't depend on LLVM, although other components in the ROCm stack do. You should probably build ROCT and ROCR first, ensure those work in Julia, then get the rest of the stack (like rocBLAS, rocFFT, etc.) built with your static LLVM build once you get the chance.

from amdgpu.jl.

gdkrmr avatar gdkrmr commented on June 1, 2024

will this get fixed by #6?

from amdgpu.jl.

jpsamaroo avatar jpsamaroo commented on June 1, 2024

Yes, that would be a valid solution to this problem for uses not relying on external libraries (BLAS, FFT, etc.).

from amdgpu.jl.

antholzer avatar antholzer commented on June 1, 2024

@jpsamaroo did you get rocBLAS to work that way? As soon as I install it (or put it into LD_LIBRARY_PATH) I get the 'disable-symbolication' build error and I did build it using a statically compiled LLVM.
rocFFT and rocRAND do not cause this.

from amdgpu.jl.

jpsamaroo avatar jpsamaroo commented on June 1, 2024

TBH I haven't built them locally, and I think they might not be running on CI either (not sure why). @vchuravy any ideas why this would happen with our deps being statically linked to LLVM?

from amdgpu.jl.

vchuravy avatar vchuravy commented on June 1, 2024

Static global variables aliasing each other... probably.

from amdgpu.jl.

jpsamaroo avatar jpsamaroo commented on June 1, 2024

Wonderful. Maybe we could solve this by shipping rocBLAS (and the other libs) as artifacts, linked against Julia's LLVM?

from amdgpu.jl.

gdkrmr avatar gdkrmr commented on June 1, 2024

I haven't gotten compute to run at all on the gpu, it seems that the Ryzen 4750U gpu is not supported by rocm (RadeonOpenCompute/ROCm#1101). It seems that the closed source driver do support it and I may try it.

from amdgpu.jl.

jpsamaroo avatar jpsamaroo commented on June 1, 2024

Some basic parts of AMDGPU do work on my Renoir APU (I can allocate a ROCArray and do some regular kernel launches), but running the tests causes my display manager to hang, so I've not been doing much of that 😄

from amdgpu.jl.

gdkrmr avatar gdkrmr commented on June 1, 2024

@jpsamaroo What OS and drivers are you using? Running clinfo causes my laptop to freeze :-(

from amdgpu.jl.

jpsamaroo avatar jpsamaroo commented on June 1, 2024

Alpine Linux (musl) with a patched ROCT on 3.8 and ROCR on 3.5, currently using the ROCK kernel for my laptop and 5.9 RC on my server (which runs AMDGPU CI). I don't have rocBLAS, rocFFT, et. al installed since build times are horrid and Alpine doesn't have packages for anything ROCm-related. rocm_smi.py works fine for me.

from amdgpu.jl.

jpsamaroo avatar jpsamaroo commented on June 1, 2024

@gdkrmr #187 should improve this situation significantly, by shipping artifacts built against a static LLVM. Please give it a try (and make sure to run a current Linux kernel). I have my Renoir APU passing tests with it 🙂

from amdgpu.jl.

sofiageo avatar sofiageo commented on June 1, 2024

Hey, I somehow stumbled upon this issue and I thought it would be a good idea to check Julia AMDGPU on my system. I tried to run it wasn't working at first, but the stacktrace helped me and after a long investigation I found out that there was something wrong with a library path (rocalution) of my ROCm 5.0 installation. After fixing that I get normal output from JuliaGPU.

HSA Runtime (ready)
- Path: /home/sofiageo/.julia/artifacts/b1aa837f69ba67b20f9654af56c818e6d9bfd262/lib/libhsa-runtime64.so
- Version: 1.1.0
- Initialized: true
ld.lld (ready)
- Path: /home/sofiageo/.julia/artifacts/836082a6a472e357ce62db92868086df6735be27/bin/lld
ROCm-Device-Libs (ready)
- Path: /home/sofiageo/.julia/artifacts/84cbee8fa15e34e61aeb7d3c17f24c8c0d3214e1/amdgcn/bitcode
- Downloaded: false
HIP Runtime (ready)
- Path: /home/sofiageo/.julia/artifacts/b5a35fe56035e3d95e3203689c38aafec324a861/hip/lib/libamdhip64.so
rocBLAS (ready)
- Path: /opt/rocm-5.0.0/lib/librocblas.so
rocSOLVER (ready)
- Path: /opt/rocm-5.0.0/lib/librocsolver.so
rocFFT (ready)
- Path: /opt/rocm-5.0.0/lib/librocfft.so
rocRAND (ready)
- Path: /home/sofiageo/.julia/artifacts/3c565b6e353eb2ec9345ac55ba0f2d6be3444bea/hiprand/lib/../../rocrand/lib/librocrand.so.1
rocSPARSE (ready)
- Path: /opt/rocm-5.0.0/lib/librocsparse.so
rocALUTION (ready)
- Path: /opt/rocm/lib/librocalution.so
MIOpen (ready)
- Path: /opt/rocm/lib/libMIOpen.so
HSA Agents (2):
- GPU: Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] (gfx1010)
- CPU: AMD Ryzen 7 2700X Eight-Core Processor

I didn't want to open a new issue just to say it works for me so I hope I'm not creating much spam here :)

from amdgpu.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.