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

AMDGPU on windows #465

Closed
meysamrajabi95 opened this issue Aug 9, 2023 · 10 comments
Closed

AMDGPU on windows #465

meysamrajabi95 opened this issue Aug 9, 2023 · 10 comments

Comments

@meysamrajabi95
Copy link

Based on the new update of the ROCm driver: [https://rocm.docs.amd.com/en/latest/deploy/windows/quick_start.html]

now AMDGPU should work on Windows too, right?

@pxl-th
Copy link
Member

pxl-th commented Aug 9, 2023

In theory yes, but would require changes to AMDGPU.jl package.
Mainly (or at least) adapting to newer versions of LLVM (ROCm 5.5 uses LLVM 16) and taking into account Windows directory structure during initialization.

@pxl-th
Copy link
Member

pxl-th commented Aug 9, 2023

But Windows support is definitely on a list

@meysamrajabi95
Copy link
Author

Thank you! So, I still can not use the AMDGPU package on Windows and I should wait for the new version of AMDGPU.jl ?
Because I set up ROCm and still got the "No GPU devices detected" error.

@pxl-th
Copy link
Member

pxl-th commented Aug 9, 2023

Because I set up ROCm and still got the "No GPU devices detected" error.

Because it does not know about Windows directory structure and assumes Linux.
If you can adapt bindeps_setup function that loads ROCm libraries to Windows that could be a start.

You'd need to change default paths (from /opt/rocm on Linux to whatever it is on Windows) and load .dll instead .so.

Also, I'm not sure about ROCm HSA library being available on Windows, which is one of the core libraries.

If you did everything correctly, AMDGPU.versioninfo() should give you paths to all libraries that it loaded:

julia> AMDGPU.versioninfo()
ROCm provided by: system
[+] HSA Runtime v1.1.0
    @ /opt/rocm-5.4.3/lib/libhsa-runtime64.so
[+] ld.lld
    @ /opt/rocm/llvm/bin/ld.lld
[+] ROCm-Device-Libs
    @ /opt/rocm/amdgcn/bitcode
[+] HIP Runtime v5.504.22804
    @ /opt/rocm-5.4.3/lib/libamdhip64.so
[+] rocBLAS v2.46.0
    @ /opt/rocm-5.4.3/lib/librocblas.so.0
[+] rocSOLVER v3.20.0
    @ /opt/rocm-5.4.3/lib/librocsolver.so
[+] rocALUTION
    @ /opt/rocm-5.4.3/lib/librocalution.so
[+] rocSPARSE
    @ /opt/rocm-5.4.3/lib/librocsparse.so
[+] rocRAND v2.10.5
    @ /opt/rocm-5.4.3/lib/librocrand.so
[+] rocFFT v1.0.21
    @ /opt/rocm-5.4.3/lib/librocfft.so
[+] MIOpen v2.19.0
    @ /opt/rocm-5.4.3/lib/libMIOpen.so

HIP Devices [1]
    1. HIPDevice(name="AMD Radeon RX 6700 XT", id=1)

@meysamrajabi95
Copy link
Author

now Im getting this:
julia> AMDGPU.versioninfo() ROCm provided by: system [-] HSA Runtime [-] ld.lld [-] ROCm-Device-Libs [-] HIP Runtime [-] rocBLAS [-] rocSOLVER [-] rocALUTION [-] rocSPARSE [-] rocRAND [-] rocFFT [-] MIOpen

but I believe I have all this lib in the ROCm driver installed path:
image

But I don't know how to add these to Julia/AMDGPU package so I don't have this error

@pxl-th
Copy link
Member

pxl-th commented Aug 10, 2023

Is there a way to install dynamic libraries? .lib is a static library and won't work.
There should be .dlls instead.

@vchuravy
Copy link
Member

I think those .lib are import libraries not static archives. The question is are there dll somewhere else?

Good news is that according to the LLVM docs the triple amdhsa is supported on windows if "AMD’s PAL runtime using the pal-amdhsa loader on Windows."

@vchuravy
Copy link
Member

I just used wine to unpack the installer on Linux and as expected the dll are in the bin folder.

@pxl-th
Copy link
Member

pxl-th commented Nov 23, 2023

AMDGPU 0.8 has initial Windows support. Make sure to check requirements.

@meysamrajabi95
Copy link
Author

AMDGPU 0.8 has initial Windows support. Make sure to check requirements.

This is awesome. Thanks

@pxl-th pxl-th closed this as completed Nov 24, 2023
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

3 participants